diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 02:13:00 -0300 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-14 13:17:32 +0200 |
commit | b95d6e84b00bd926b1118f6a820eca7a870b8c35 (patch) | |
tree | 0753080f3b0dabbe0b2f62abe044c24d6b4ed5c4 /actionpack/test/template/translation_helper_test.rb | |
parent | 36a84a4f15f29b41c7cac2f8de410055006a8a8d (diff) | |
download | rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.tar.gz rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.tar.bz2 rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.zip |
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
Diffstat (limited to 'actionpack/test/template/translation_helper_test.rb')
-rw-r--r-- | actionpack/test/template/translation_helper_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/template/translation_helper_test.rb b/actionpack/test/template/translation_helper_test.rb index 1be418a206..952719a589 100644 --- a/actionpack/test/template/translation_helper_test.rb +++ b/actionpack/test/template/translation_helper_test.rb @@ -7,12 +7,12 @@ class TranslationHelperTest < ActiveSupport::TestCase attr_reader :request def setup end - + def test_delegates_to_i18n_setting_the_raise_option I18n.expects(:translate).with(:foo, :locale => 'en', :raise => true).returns("") translate :foo, :locale => 'en' end - + def test_returns_missing_translation_message_wrapped_into_span expected = '<span class="translation_missing">en, foo</span>' assert_equal expected, translate(:foo) @@ -28,7 +28,7 @@ class TranslationHelperTest < ActiveSupport::TestCase I18n.expects(:localize).with(@time) localize @time end - + def test_scoping_by_partial I18n.expects(:translate).with("test.translation.helper", :raise => true).returns("helper") @view = ActionView::Base.new(ActionController::Base.view_paths, {}) @@ -40,7 +40,7 @@ class TranslationHelperTest < ActiveSupport::TestCase @view = ActionView::Base.new(ActionController::Base.view_paths, {}) assert_equal "foobar", @view.render(:file => "test/scoped_translation") end - + def test_translate_does_not_mark_plain_text_as_safe_html I18n.expects(:translate).with("hello", :raise => true).returns("Hello World") assert_equal false, translate("hello").html_safe? |