public
Description: Globalization made easy with interface in place translations
Homepage: http://lucaguidi.com/projects/click-to-globalize
Clone URL: git://github.com/jodosha/click-to-globalize.git
Test cleanup
jodosha (author)
Thu Jul 17 08:32:51 -0700 2008
commit  04b35f9bf2d0cdece5cbde3f275cdc4c631df22b
tree    3ed117c5489628ef683f96741c3256ec1e674bcf
parent  5bd9bc33b696264e5a54a42383f42627590ca5df
...
30
31
32
33
34
35
36
...
218
219
220
221
222
 
 
223
224
225
...
229
230
231
232
 
233
234
235
...
242
243
244
245
 
246
247
248
...
281
282
283
 
 
 
 
284
285
286
...
30
31
32
 
33
34
35
...
217
218
219
 
 
220
221
222
223
224
...
228
229
230
 
231
232
233
234
...
241
242
243
 
244
245
246
247
...
280
281
282
283
284
285
286
287
288
289
0
@@ -30,7 +30,6 @@ class ClickToGlobalizeTest < Test::Unit::TestCase
0
     # TODO load w/ #inject
0
     @hello_world  = Translation.find(1)
0
     @ciao_mondo   = Translation.find(2)
0
-    @good_morning = Translation.find(3)
0
 
0
     @default_locale = Locale.new('en-US')
0
     @italian_locale = Locale.new('it-IT')
0
@@ -218,8 +217,8 @@ class ClickToGlobalizeTest < Test::Unit::TestCase
0
     assert_response :success
0
 
0
     expected = { @hello_world.tr_key => @hello_world.text }
0
-    assert_any @request.session[:__globalize_translations]
0
-    assert_equal expected, @request.session[:__globalize_translations]
0
+    assert_any translations
0
+    assert_equal expected, translations
0
   end
0
 
0
   def test_should_return_formatted_translations
0
@@ -229,7 +228,7 @@ class ClickToGlobalizeTest < Test::Unit::TestCase
0
       assert_response :success
0
       
0
       expected = { 'hello_mars' => %(<strong>Hello Mars!</strong>) }
0
-      assert_equal expected, @request.session[:__globalize_translations]
0
+      assert_equal expected, translations
0
     end
0
   end
0
 
0
@@ -242,7 +241,7 @@ class ClickToGlobalizeTest < Test::Unit::TestCase
0
         assert_response :success
0
 
0
         expected = { 'hello_moon' => '*Hello Moon!*' }
0
-        assert_equal expected, @request.session[:__globalize_translations]      
0
+        assert_equal expected, translations
0
       end
0
     end
0
   end
0
@@ -281,6 +280,10 @@ class ClickToGlobalizeTest < Test::Unit::TestCase
0
       { :key => @hello_world.tr_key, :language_id => 1, :locale => @default_locale.code }.merge!(options)
0
     end
0
     
0
+    def translations
0
+      @request.session[:__globalize_translations]
0
+    end
0
+    
0
     def create_translation(key, text)
0
       translation = Translation.new(:tr_key => key, :text => text,
0
         :language_id => 1, :pluralization_index => 1) do |t|

Comments