зеркало из https://github.com/github/ruby.git
[ruby/rdoc] Allow empty .rdoc_options
https://github.com/ruby/rdoc/commit/0c8cb25b50
This commit is contained in:
Родитель
971a0cd246
Коммит
61a29a41e1
|
@ -166,6 +166,8 @@ class RDoc::RDoc
|
|||
rescue Psych::SyntaxError
|
||||
end
|
||||
|
||||
return RDoc::Options.new if options == false # Allow empty file.
|
||||
|
||||
raise RDoc::Error, "#{options_file} is not a valid rdoc options file" unless
|
||||
RDoc::Options === options or Hash === options
|
||||
|
||||
|
|
|
@ -133,6 +133,17 @@ class TestRDocRDoc < RDoc::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_load_options_empty_file
|
||||
temp_dir do
|
||||
File.open '.rdoc_options', 'w' do |io|
|
||||
end
|
||||
|
||||
options = @rdoc.load_options
|
||||
|
||||
assert_equal 'rdoc', options.markup
|
||||
end
|
||||
end
|
||||
|
||||
def test_load_options_partial_override
|
||||
temp_dir do
|
||||
File.open '.rdoc_options', 'w' do |io|
|
||||
|
|
Загрузка…
Ссылка в новой задаче