Skip to content

Instantly share code, notes, and snippets.

@zzak
Created March 15, 2013 02:24
Show Gist options
  • Save zzak/5167046 to your computer and use it in GitHub Desktop.
Save zzak/5167046 to your computer and use it in GitHub Desktop.
diff --git a/test/test_rdoc_options.rb b/test/test_rdoc_options.rb
index 5d7135c..97fd4ef 100644
--- a/test/test_rdoc_options.rb
+++ b/test/test_rdoc_options.rb
@@ -220,6 +220,18 @@ rdoc_include:
assert_equal 1, @options.coverage_report
end
+ def test_parse_needless_arg
+ assert_raises OptionParser::NeedlessArgument do
+ @options.parse %w[--ri=foo]
+ end
+ end
+
+ def test_parse_missing_arg
+ assert_raises OptionParser::MissingArgument do
+ @options.parse %w[--copy-files]
+ end
+ end
+
def test_parse_dash_p
out, err = capture_io do
@options.parse %w[-p]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment