diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/optparse/test_noarg.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/optparse/test_noarg.rb b/test/optparse/test_noarg.rb index cd57ed5a56..28c469093d 100644 --- a/test/optparse/test_noarg.rb +++ b/test/optparse/test_noarg.rb @@ -31,8 +31,8 @@ module TestOptionParser::NoArg assert_equal(%w"", no_error {@opt.parse!(%w"-o")}) assert_equal(true, @flag) @flag = nil - no_error {@opt.parse!(%w"-O")} - assert_equal(true, @flag) + assert_raises(OptionParser::InvalidOption) {@opt.parse!(%w"-O")} + assert_nil(@flag) @flag = nil assert_equal(%w"foo", no_error {@opt.parse!(%w"-o foo")}) assert_equal(true, @flag) |