Skip to content

Commit

Permalink
redundant begin
Browse files Browse the repository at this point in the history
  • Loading branch information
copiousfreetime committed May 3, 2024
1 parent ecde465 commit 9357dd0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions spec/cli_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 9357dd0

Please sign in to comment.