Sha256: 1a3152b96ac6a2ea7a33ca45018ec657c321c526ede115cd3c4aa48722a048e7

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

require "test_helper"

class OptionsTest < Test::Unit::TestCase
  def test_should_add_github_url_option
    o = Options.instance
    o.parse(%w(--github_url http://www.github.com), RDoc::RDoc::GENERATORS)
    assert_not_nil(o.github_url)
  end
  
  def test_should_set_default_generator_to_shtml
    o = Options.instance
    o.parse(%w(--github_url http://www.github.com), RDoc::RDoc::GENERATORS)
    assert_equal('shtml', o.generator.key)
  end
  
  def test_should_set_default_template_to_shtml
    o = Options.instance
    o.parse(%w(--github_url http://www.github.com), RDoc::RDoc::GENERATORS)
    assert_equal('shtml', o.template)
  end
  
  def test_should_set_is_all_in_one_file_to_false
    o = Options.instance
    o.parse(%w(--one-file), RDoc::RDoc::GENERATORS)
    assert(!o.all_one_file, "Should not use all in one file")
  end
  
  def test_should_set_is_all_in_one_file_to_false_if_fmt_present
    o = Options.instance
    o.parse(%w(--one-file --fmt shtml), RDoc::RDoc::GENERATORS)
    assert(!o.all_one_file, "Should not use all in one file")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
voloko-sdoc-0.0.1 test/options_test.rb
voloko-sdoc-0.0.2 test/options_test.rb
voloko-sdoc-0.0.4 test/options_test.rb
voloko-sdoc-0.0.5 test/options_test.rb