@@ -13,19 +13,15 @@ def test_assigns_in_current_locale
1313 def test_retrieves_in_current_locale
1414 p = Post . new (
1515 :title_translations => { "en" => "English Title" , "fr" => "Titre français" } ,
16- :body_1_translations => { "en" => "English Body" , "fr" => "Corps anglais " }
16+ :body_1_translations => { "en" => "English Body" , "fr" => "Corps français " }
1717 )
1818 I18n . with_locale ( :fr ) do
1919 assert_equal ( "Titre français" , p . title )
20- assert_equal ( "Corps anglais " , p . body_1 )
20+ assert_equal ( "Corps français " , p . body_1 )
2121 end
2222 end
2323
2424 def test_retrieves_in_current_locale_with_fallbacks
25- I18n ::Backend ::Simple . include ( I18n ::Backend ::Fallbacks )
26- I18n . default_locale = :"en-US"
27- I18n . fallbacks = I18n ::Locale ::Fallbacks . new ( fr : :"en-US" )
28-
2925 p = Post . new ( :title_translations => { "en" => "English Title" } , :body_1_translations => { "en" => "English Body" } )
3026 I18n . with_locale ( :fr ) do
3127 assert_equal ( "English Title" , p . title )
@@ -90,10 +86,6 @@ def test_retrieves_in_specified_locale
9086 end
9187
9288 def test_retrieves_in_specified_locale_with_fallbacks
93- I18n ::Backend ::Simple . include ( I18n ::Backend ::Fallbacks )
94- I18n . default_locale = :"en-US"
95- I18n . fallbacks = I18n ::Locale ::Fallbacks . new ( fr : :"en-US" )
96-
9789 p = Post . new ( :title_translations => { "en" => "English Title" } , :body_1_translations => { "en" => "English Body" } )
9890 I18n . with_locale ( :fr ) do
9991 assert_equal ( "English Title" , p . title )
@@ -106,10 +98,6 @@ def test_retrieves_in_specified_locale_with_fallbacks
10698 end
10799
108100 def test_fallback_from_empty_string
109- I18n ::Backend ::Simple . include ( I18n ::Backend ::Fallbacks )
110- I18n . default_locale = :"en-US"
111- I18n . fallbacks = I18n ::Locale ::Fallbacks . new ( fr : :"en-US" )
112-
113101 p = Post . new ( :title_translations => { "en" => "English Title" , "fr" => "" } , :body_1_translations => { "en" => "English Body" , "fr" => "" } )
114102 I18n . with_locale ( :fr ) do
115103 assert_equal ( "English Title" , p . title )
@@ -122,10 +110,6 @@ def test_fallback_from_empty_string
122110 end
123111
124112 def test_retrieves_in_specified_locale_with_fallback_disabled
125- I18n ::Backend ::Simple . include ( I18n ::Backend ::Fallbacks )
126- I18n . default_locale = :"en-US"
127- I18n . fallbacks = I18n ::Locale ::Fallbacks . new ( fr : :"en-US" )
128-
129113 p = Post . new ( :title_translations => { "en" => "English Title" } , :body_1_translations => { "en" => "English Body" } )
130114 p . disable_fallback
131115 I18n . with_locale ( :fr ) do
@@ -135,10 +119,6 @@ def test_retrieves_in_specified_locale_with_fallback_disabled
135119 end
136120
137121 def test_retrieves_in_specified_locale_with_fallback_disabled_using_a_block
138- I18n ::Backend ::Simple . include ( I18n ::Backend ::Fallbacks )
139- I18n . default_locale = :"en-US"
140- I18n . fallbacks = I18n ::Locale ::Fallbacks . new ( fr : :"en-US" )
141-
142122 p = Post . new ( :title_translations => { "en" => "English Title" } , :body_1_translations => { "en" => "English Body" } )
143123 p . enable_fallback
144124
@@ -163,10 +143,6 @@ def test_retrieves_in_specified_locale_with_fallback_disabled_using_a_block
163143 end
164144
165145 def test_retrieves_in_specified_locale_with_fallback_reenabled
166- I18n ::Backend ::Simple . include ( I18n ::Backend ::Fallbacks )
167- I18n . default_locale = :"en-US"
168- I18n . fallbacks = I18n ::Locale ::Fallbacks . new ( fr : :"en-US" )
169-
170146 p = Post . new ( :title_translations => { "en" => "English Title" } , :body_1_translations => { "en" => "English Body" } )
171147 p . disable_fallback
172148 p . enable_fallback
@@ -181,10 +157,6 @@ def test_retrieves_in_specified_locale_with_fallback_reenabled
181157 end
182158
183159 def test_retrieves_in_specified_locale_with_fallback_reenabled_using_a_block
184- I18n ::Backend ::Simple . include ( I18n ::Backend ::Fallbacks )
185- I18n . default_locale = :"en-US"
186- I18n . fallbacks = I18n ::Locale ::Fallbacks . new ( fr : :"en-US" )
187-
188160 p = Post . new ( :title_translations => { "en" => "English Title" } , :body_1_translations => { "en" => "English Body" } )
189161 p . disable_fallback
190162
0 commit comments