Skip to content

Instantly share code, notes, and snippets.

@zzak
Created March 24, 2013 03:04
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/5230298 to your computer and use it in GitHub Desktop.
Save zzak/5230298 to your computer and use it in GitHub Desktop.
describe RDoc::Generator::SDoc do
before :each do
@options = RDoc::Options.new
@options.setup_generator 'sdoc'
@parser = @options.option_parser
#@default_options = %w[--format=sdoc]
end
it "should find sdoc generator" do
RDoc::RDoc::GENERATORS.must_include 'sdoc'
end
it "should use sdoc generator" do
@options.generator.must_equal RDoc::Generator::SDoc
end
it "should parse github option" do
@options = RDoc::Options.new
out, err = capture_io do
@parser.parse '--github'
end
err.wont_match /%invalid options%/
@options.github.must_equal true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment