test/test_rdoc_options.rb in rdoc-4.1.2 vs test/test_rdoc_options.rb in rdoc-4.2.0

- old
+ new

@@ -65,10 +65,13 @@ 'charset' => 'UTF-8', 'encoding' => encoding, 'exclude' => [], 'hyperlink_all' => false, 'line_numbers' => false, + 'locale' => nil, + 'locale_dir' => 'locale', + 'locale_name' => nil, 'main_page' => nil, 'markup' => 'rdoc', 'output_decoration' => true, 'page_dir' => nil, 'rdoc_include' => [], @@ -332,10 +335,22 @@ assert_equal 'invalid option: -R generator already set to darkfish', e.message end + def test_parse_h + out, = capture_io do + begin + @options.parse %w[-h] + rescue SystemExit + end + end + + assert_equal 1, out.scan(/HTML generator options:/).length + assert_equal 1, out.scan(/ri generator options:/). length + end + def test_parse_help out, = capture_io do begin @options.parse %w[--help] rescue SystemExit @@ -741,7 +756,11 @@ end assert out.include?(RDoc::VERSION) end + def test_visibility + @options.visibility = :all + assert_equal :private, @options.visibility + end end