Skip to content
This repository was archived by the owner on Dec 28, 2023. It is now read-only.

Commit b87f163

Browse files
Revert #default_separator on base test case
Clean teardown methods a bit by relying on the base test case.
1 parent ad9affb commit b87f163

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

test/gettext/backend_test.rb

+1-8
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,7 @@ def setup
1717
I18n.backend = Backend.new
1818
I18n.locale = :en
1919
I18n.load_path = ["#{locales_dir}/de.po"]
20-
@old_separator, I18n.default_separator = I18n.default_separator, '|'
21-
end
22-
23-
def teardown
24-
I18n.load_path = nil
25-
I18n.backend = nil
26-
I18n.default_separator = @old_separator
27-
super
20+
I18n.default_separator = '|'
2821
end
2922

3023
def test_backend_loads_po_file

test/locale/fallbacks_test.rb

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
include I18n::Locale
44

55
class I18nFallbacksDefaultsTest < I18n::TestCase
6-
def teardown
7-
I18n.default_locale = :en
8-
super
9-
end
10-
116
test "defaults reflect the I18n.default_locale if no default has been set manually" do
127
I18n.default_locale = :'en-US'
138
fallbacks = Fallbacks.new

test/test_helper.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ def setup
4949

5050
def teardown
5151
I18n.locale = nil
52-
I18n.default_locale = :en
53-
I18n.load_path = []
52+
I18n.default_locale = nil
53+
I18n.load_path = nil
5454
I18n.available_locales = nil
5555
I18n.backend = nil
56+
I18n.default_separator = nil
5657
I18n.enforce_available_locales = true
5758
super
5859
end

0 commit comments

Comments
 (0)