Created
March 23, 2013 21:37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Failure: | |
TestRDocGeneratorCustom#test_parse_custom_generator_options [/home/zzak/projects/rdoc/test/test_rdoc_generator_custom.rb:75]: | |
Expected /^invalid options/ to not match "invalid options: --custom-generator\n(invalid options are ignored)\n". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rdoc/test_case' | |
class RDoc::Generator::Custom | |
RDoc::RDoc.add_generator self | |
attr_accessor :custom_generator | |
def self.setup_options options | |
@custom_generator = false | |
opt = options.option_parser | |
opt.on("--custom-generator") do |value| | |
@custom_generator = true | |
end | |
end | |
end | |
class TestRDocGeneratorCustom < RDoc::TestCase | |
def setup | |
super | |
@options = RDoc::Options.new | |
@generator = RDoc::Generator::Custom | |
end | |
def test_parse_custom_generator_options | |
out, err = capture_io do | |
@options.parse %W[--custom-generator] | |
end | |
refute_match %r%^invalid options%, err | |
assert_empty out | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment