Skip to content

Commit b2a35ee

Browse files
committed
Rename and move the tests for --locale option [ci skip]
1 parent fd610f7 commit b2a35ee

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

test/rdoc/test_rdoc_options.rb

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,28 @@ def test_parse_extension_alias
719719
assert_empty err
720720
end
721721

722+
def test_parse_locale_name_default
723+
temp_dir do
724+
@options.parse %w[]
725+
assert_equal 'locale', @options.instance_variable_get(:@locale_dir)
726+
assert_nil @options.instance_variable_get(:@locale_name)
727+
assert_nil @options.locale
728+
@options.finish
729+
assert_nil @options.locale
730+
end
731+
end
732+
733+
def test_parse_locale_name
734+
temp_dir do
735+
@options.parse %w[--locale fr]
736+
assert_equal 'locale', @options.instance_variable_get(:@locale_dir)
737+
assert_equal 'fr', @options.instance_variable_get(:@locale_name)
738+
assert_nil @options.locale
739+
@options.finish
740+
assert_equal 'fr', @options.locale.name
741+
end
742+
end
743+
722744
def test_setup_generator
723745
test_generator = Class.new do
724746
def self.setup_options op
@@ -901,28 +923,6 @@ def test_no_skip_test_value
901923
assert_equal false, @options.skip_tests
902924
end
903925

904-
def test_locale_name_default
905-
temp_dir do
906-
@options.parse %w[]
907-
assert_equal 'locale', @options.instance_variable_get(:@locale_dir)
908-
assert_nil @options.instance_variable_get(:@locale_name)
909-
assert_nil @options.locale
910-
@options.finish
911-
assert_nil @options.locale
912-
end
913-
end
914-
915-
def test_locale_name
916-
temp_dir do
917-
@options.parse %w[--locale fr]
918-
assert_equal 'locale', @options.instance_variable_get(:@locale_dir)
919-
assert_equal 'fr', @options.instance_variable_get(:@locale_name)
920-
assert_nil @options.locale
921-
@options.finish
922-
assert_equal 'fr', @options.locale.name
923-
end
924-
end
925-
926926
class DummyCoder < Hash
927927
alias add :[]=
928928
def tag=(tag)

0 commit comments

Comments
 (0)