Skip to content

Commit

Permalink
move permitted test to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
nanobowers committed May 19, 2024
1 parent 35c8bf4 commit 99304ad
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions test/optimist/parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,6 @@ def test_required_flags_are_required
assert_raises(CommandlineError) { @p.parse(%w(--arg2 --arg3)) }
end

def test_permitted_flags_filter_inputs
@p.opt "arg", "desc", :type => :strings, :permitted => %w(foo bar)

result = @p.parse(%w(--arg foo))
assert_equal ["foo"], result["arg"]
assert_raises(CommandlineError) { @p.parse(%w(--arg baz)) }
end

## flags that take an argument error unless given one
def test_argflags_demand_args
@p.opt "goodarg", "desc", :type => String
Expand Down

0 comments on commit 99304ad

Please sign in to comment.