aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/translation_helper_test.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-08-14 02:13:00 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-08-14 04:12:33 -0300
commitb451de0d6de4df6bc66b274cec73b919f823d5ae (patch)
treef252c4143a0adb3be7d36d543282539cca0fb971 /actionpack/test/template/translation_helper_test.rb
parent1590377886820e00b1a786616518a32f3b61ec0f (diff)
downloadrails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.gz
rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.bz2
rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.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.rb8
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?