[ruby/rdoc] Rename and move the tests for --locale
option [ci skip]
https://github.com/ruby/rdoc/commit/b2a35ee39d
This commit is contained in:
parent
f6847e9456
commit
d1de2a34c1
@ -719,6 +719,28 @@ rdoc_include:
|
|||||||
assert_empty err
|
assert_empty err
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_parse_locale_name_default
|
||||||
|
temp_dir do
|
||||||
|
@options.parse %w[]
|
||||||
|
assert_equal 'locale', @options.instance_variable_get(:@locale_dir)
|
||||||
|
assert_nil @options.instance_variable_get(:@locale_name)
|
||||||
|
assert_nil @options.locale
|
||||||
|
@options.finish
|
||||||
|
assert_nil @options.locale
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_parse_locale_name
|
||||||
|
temp_dir do
|
||||||
|
@options.parse %w[--locale fr]
|
||||||
|
assert_equal 'locale', @options.instance_variable_get(:@locale_dir)
|
||||||
|
assert_equal 'fr', @options.instance_variable_get(:@locale_name)
|
||||||
|
assert_nil @options.locale
|
||||||
|
@options.finish
|
||||||
|
assert_equal 'fr', @options.locale.name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_setup_generator
|
def test_setup_generator
|
||||||
test_generator = Class.new do
|
test_generator = Class.new do
|
||||||
def self.setup_options op
|
def self.setup_options op
|
||||||
@ -901,28 +923,6 @@ rdoc_include:
|
|||||||
assert_equal false, @options.skip_tests
|
assert_equal false, @options.skip_tests
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_locale_name_default
|
|
||||||
temp_dir do
|
|
||||||
@options.parse %w[]
|
|
||||||
assert_equal 'locale', @options.instance_variable_get(:@locale_dir)
|
|
||||||
assert_nil @options.instance_variable_get(:@locale_name)
|
|
||||||
assert_nil @options.locale
|
|
||||||
@options.finish
|
|
||||||
assert_nil @options.locale
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_locale_name
|
|
||||||
temp_dir do
|
|
||||||
@options.parse %w[--locale fr]
|
|
||||||
assert_equal 'locale', @options.instance_variable_get(:@locale_dir)
|
|
||||||
assert_equal 'fr', @options.instance_variable_get(:@locale_name)
|
|
||||||
assert_nil @options.locale
|
|
||||||
@options.finish
|
|
||||||
assert_equal 'fr', @options.locale.name
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class DummyCoder < Hash
|
class DummyCoder < Hash
|
||||||
alias add :[]=
|
alias add :[]=
|
||||||
def tag=(tag)
|
def tag=(tag)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user