Skip to content

Instantly share code, notes, and snippets.

@zzak
Created March 24, 2013 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zzak/5230067 to your computer and use it in GitHub Desktop.
Save zzak/5230067 to your computer and use it in GitHub Desktop.
diff --git a/test/test_rdoc_options.rb b/test/test_rdoc_options.rb
index 89245fa..d72ee22 100644
--- a/test/test_rdoc_options.rb
+++ b/test/test_rdoc_options.rb
@@ -372,6 +372,20 @@ rdoc_include:
assert_equal 1, out.scan(/test generator options:/).length
end
+ def test_parse_format_for_extra_generator
+ RDoc::RDoc::GENERATORS['test'] = Class.new do
+ def self.setup_options options
+ op = options.option_parser
+
+ op.separator 'test generator options:'
+ end
+ end
+
+ @options.send :setup_generator, 'test'
+
+ assert_equal @options.generator_name, 'test'
+ end
+
def test_parse_ignore_invalid
out, err = capture_io do
@options.parse %w[--ignore-invalid --bogus]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment