public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
i18n: fixed failing tests after removing #populate and #store_translations
mseppae (author)
Wed Aug 27 01:37:01 -0700 2008
svenfuchs (committer)
Wed Aug 27 01:37:01 -0700 2008
commit  2d03a4c668b0229ad070c04a7c82bd803bc25788
tree    a2cc5f32053e2f6b787f74dec99b345fe751a754
parent  0fcd5b5466461e44b6f3b007fa2a2fdf43f55681
...
5
6
7
8
 
9
10
11
12
 
13
14
15
16
17
 
18
19
20
21
22
 
23
24
25
26
27
 
28
29
30
31
32
 
33
34
35
36
37
 
38
39
40
41
42
43
44
45
46
...
5
6
7
 
8
9
10
11
 
12
13
14
15
16
 
17
18
19
20
21
 
22
23
24
25
26
 
27
28
29
30
31
 
32
33
34
35
36
 
37
38
39
 
 
 
 
 
40
41
0
@@ -5,42 +5,37 @@ require 'models/reply'
0
 class ActiveRecordI18nTests < Test::Unit::TestCase
0
 
0
   def setup
0
-    reset_translations
0
+    I18n.backend = I18n::Backend::Simple.new
0
   end
0
   
0
   def test_translated_model_attributes
0
-    I18n.store_translations 'en-US', :activerecord => {:attributes => {:topic => {:title => 'topic title attribute'} } }
0
+    I18n.backend.store_translations 'en-US', :activerecord => {:attributes => {:topic => {:title => 'topic title attribute'} } }
0
     assert_equal 'topic title attribute', Topic.human_attribute_name('title')
0
   end
0
 
0
   def test_translated_model_attributes_with_sti
0
-    I18n.store_translations 'en-US', :activerecord => {:attributes => {:reply => {:title => 'reply title attribute'} } }
0
+    I18n.backend.store_translations 'en-US', :activerecord => {:attributes => {:reply => {:title => 'reply title attribute'} } }
0
     assert_equal 'reply title attribute', Reply.human_attribute_name('title')
0
   end
0
 
0
   def test_translated_model_attributes_with_sti_fallback
0
-    I18n.store_translations 'en-US', :activerecord => {:attributes => {:topic => {:title => 'topic title attribute'} } }
0
+    I18n.backend.store_translations 'en-US', :activerecord => {:attributes => {:topic => {:title => 'topic title attribute'} } }
0
     assert_equal 'topic title attribute', Reply.human_attribute_name('title')
0
   end
0
 
0
   def test_translated_model_names
0
-    I18n.store_translations 'en-US', :activerecord => {:models => {:topic => 'topic model'} }
0
+    I18n.backend.store_translations 'en-US', :activerecord => {:models => {:topic => 'topic model'} }
0
     assert_equal 'topic model', Topic.human_name
0
   end
0
 
0
   def test_translated_model_names_with_sti
0
-    I18n.store_translations 'en-US', :activerecord => {:models => {:reply => 'reply model'} }
0
+    I18n.backend.store_translations 'en-US', :activerecord => {:models => {:reply => 'reply model'} }
0
     assert_equal 'reply model', Reply.human_name
0
   end
0
 
0
   def test_translated_model_names_with_sti_fallback
0
-    I18n.store_translations 'en-US', :activerecord => {:models => {:topic => 'topic model'} }
0
+    I18n.backend.store_translations 'en-US', :activerecord => {:models => {:topic => 'topic model'} }
0
     assert_equal 'topic model', Reply.human_name
0
   end
0
-
0
-  private
0
-    def reset_translations
0
-      I18n.backend = I18n::Backend::Simple.new
0
-    end
0
 end
0
 

Comments