Skip to content

Commit

Permalink
Test --version and --help CLI flags
Browse files Browse the repository at this point in the history
  • Loading branch information
adam12 committed Mar 6, 2021
1 parent cffb93b commit 989b84c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/standard/cli_test.rb
Expand Up @@ -36,4 +36,24 @@ def test_unfixable_manually_fixed
assert_empty fake_err.string
assert_empty fake_out.string
end

def test_version
fake_out, fake_err, exit_code = do_with_fake_io {
Standard::Cli.new(["--version"]).run
}

assert_equal 0, exit_code
assert_empty fake_err.string
refute_empty fake_out.string
end

def test_help
fake_out, fake_err, exit_code = do_with_fake_io {
Standard::Cli.new(["--help"]).run
}

assert_equal 0, exit_code
assert_empty fake_err.string
refute_empty fake_out.string
end
end

0 comments on commit 989b84c

Please sign in to comment.