diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index 921d6cd..19b7644 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -19,13 +19,11 @@ end def cli_test(argv, env, exit_val, stderr_regex, stdout_regex) - begin - Launchy::Cli.new.run(argv, env) - rescue SystemExit => e - _(e.status).must_equal exit_val - _($stderr.string).must_match stderr_regex if stderr_regex - _($stdout.string).must_match stdout_regex if stdout_regex - end + Launchy::Cli.new.run(argv, env) + rescue SystemExit => e + _(e.status).must_equal exit_val + _($stderr.string).must_match stderr_regex if stderr_regex + _($stdout.string).must_match stdout_regex if stdout_regex end it "exits 1 when invalid options are given" do