summaryrefslogtreecommitdiff
path: root/test/optparse/test_noarg.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/optparse/test_noarg.rb')
-rw-r--r--test/optparse/test_noarg.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/optparse/test_noarg.rb b/test/optparse/test_noarg.rb
index 28c4690..329956a 100644
--- a/test/optparse/test_noarg.rb
+++ b/test/optparse/test_noarg.rb
@@ -18,7 +18,7 @@ module TestOptionParser::NoArg
end
def test_short
- assert_raises(OptionParser::InvalidOption) {@opt.parse!(%w"-xq")}
+ assert_raise(OptionParser::InvalidOption) {@opt.parse!(%w"-xq")}
assert_equal(%w"", no_error {@opt.parse!(%w"-x")})
assert_equal(true, @flag)
@flag = nil
@@ -27,11 +27,11 @@ module TestOptionParser::NoArg
end
def test_abbrev
- assert_raises(OptionParser::InvalidOption) {@opt.parse!(%w"-oq")}
+ assert_raise(OptionParser::InvalidOption) {@opt.parse!(%w"-oq")}
assert_equal(%w"", no_error {@opt.parse!(%w"-o")})
assert_equal(true, @flag)
@flag = nil
- assert_raises(OptionParser::InvalidOption) {@opt.parse!(%w"-O")}
+ assert_raise(OptionParser::InvalidOption) {@opt.parse!(%w"-O")}
assert_nil(@flag)
@flag = nil
assert_equal(%w"foo", no_error {@opt.parse!(%w"-o foo")})
@@ -39,7 +39,7 @@ module TestOptionParser::NoArg
end
def test_long
- assert_raises(OptionParser::NeedlessArgument) {@opt.parse!(%w"--option=x")}
+ assert_raise(OptionParser::NeedlessArgument) {@opt.parse!(%w"--option=x")}
assert_equal(%w"", no_error {@opt.parse!(%w"--opt")})
assert_equal(true, @flag)
@flag = nil
@@ -49,8 +49,8 @@ module TestOptionParser::NoArg
def test_ambiguous
@opt.def_option("--open") {|x|}
- assert_raises(OptionParser::AmbiguousOption) {@opt.parse!(%w"--op")}
- assert_raises(OptionParser::AmbiguousOption) {@opt.parse!(%w"-o")}
+ assert_raise(OptionParser::AmbiguousOption) {@opt.parse!(%w"--op")}
+ assert_raise(OptionParser::AmbiguousOption) {@opt.parse!(%w"-o")}
assert_equal(%w"", no_error {@opt.parse!(%w"--opt")})
assert_equal(true, @flag)
end