aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/active_record_helper_i18n_test.rb
diff options
context:
space:
mode:
authorSven Fuchs <svenfuchs@artweb-design.de>2008-06-23 14:49:02 +0200
committerSven Fuchs <svenfuchs@artweb-design.de>2008-06-23 14:49:02 +0200
commitac66865ea3d0eb0de8e19fef49293feb9e61281b (patch)
treed50eef6905a95225b96060820fab38513b98070b /actionpack/test/template/active_record_helper_i18n_test.rb
parentc178a87b4326edd491922136c0a55bf4b889473d (diff)
downloadrails-ac66865ea3d0eb0de8e19fef49293feb9e61281b.tar.gz
rails-ac66865ea3d0eb0de8e19fef49293feb9e61281b.tar.bz2
rails-ac66865ea3d0eb0de8e19fef49293feb9e61281b.zip
update tests according to removal of self.locale from helpers
Diffstat (limited to 'actionpack/test/template/active_record_helper_i18n_test.rb')
-rw-r--r--actionpack/test/template/active_record_helper_i18n_test.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/actionpack/test/template/active_record_helper_i18n_test.rb b/actionpack/test/template/active_record_helper_i18n_test.rb
index 3a2197ac93..d1b92c7e4d 100644
--- a/actionpack/test/template/active_record_helper_i18n_test.rb
+++ b/actionpack/test/template/active_record_helper_i18n_test.rb
@@ -7,24 +7,11 @@ class ActiveRecordHelperI18nTest < Test::Unit::TestCase
def setup
@object = stub :errors => stub(:count => 1, :full_messages => ['full_messages'])
stubs(:content_tag).returns 'content_tag'
- stubs(:locale)
I18n.stubs(:t).with(:'header_message', :locale => 'en-US', :scope => [:active_record, :error], :count => 1, :object_name => '').returns "1 error prohibited this from being saved"
I18n.stubs(:t).with(:'message', :locale => 'en-US', :scope => [:active_record, :error]).returns 'There were problems with the following fields:'
end
- def test_error_messages_for_given_a_locale_it_does_not_check_request_for_locale
- expects(:locale).never
- @object.errors.stubs(:count).returns 0
- error_messages_for(:object => @object, :locale => 'en-US')
- end
-
- def test_error_messages_for_given_no_locale_it_checks_request_for_locale
- expects(:locale).returns 'en-US'
- @object.errors.stubs(:count).returns 0
- error_messages_for(:object => @object)
- end
-
def test_error_messages_for_given_a_header_message_option_it_does_not_translate_header_message
I18n.expects(:translate).with(:'header_message', :locale => 'en-US', :scope => [:active_record, :error], :count => 1, :object_name => '').never
error_messages_for(:object => @object, :header_message => 'header message', :locale => 'en-US')