aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-01-29 08:00:40 -0800
committerSantiago Pastorino <santiago@wyeworks.com>2012-01-29 08:00:40 -0800
commitec4440fd4e886bc491726070b9fc44938f8798ee (patch)
tree3c2e10fdc47bca7ed18539b65ef115c55156adf2 /actionpack/test/template
parent786a0195cb76f96a29896467969044f222597ae4 (diff)
parent735c56d0cd7449183c1de717091b29e57b663f47 (diff)
downloadrails-ec4440fd4e886bc491726070b9fc44938f8798ee.tar.gz
rails-ec4440fd4e886bc491726070b9fc44938f8798ee.tar.bz2
rails-ec4440fd4e886bc491726070b9fc44938f8798ee.zip
Merge pull request #4739 from nashby/refactor-date-helper
tiny refactoring of date_helper
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/date_helper_i18n_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/template/date_helper_i18n_test.rb b/actionpack/test/template/date_helper_i18n_test.rb
index ef3d7d97ee..82b62e64f3 100644
--- a/actionpack/test/template/date_helper_i18n_test.rb
+++ b/actionpack/test/template/date_helper_i18n_test.rb
@@ -103,7 +103,7 @@ class DateHelperSelectTagsI18nTests < ActiveSupport::TestCase
I18n.expects(:translate).with(('datetime.prompts.' + key.to_s).to_sym, :locale => 'en').returns prompt
end
- I18n.expects(:translate).with(:'date.order', :locale => 'en').returns [:year, :month, :day]
+ I18n.expects(:translate).with(:'date.order', :locale => 'en', :default => []).returns [:year, :month, :day]
datetime_select('post', 'updated_at', :locale => 'en', :include_seconds => true, :prompt => true)
end
@@ -115,12 +115,12 @@ class DateHelperSelectTagsI18nTests < ActiveSupport::TestCase
end
def test_date_or_time_select_given_no_order_options_translates_order
- I18n.expects(:translate).with(:'date.order', :locale => 'en').returns [:year, :month, :day]
+ I18n.expects(:translate).with(:'date.order', :locale => 'en', :default => []).returns [:year, :month, :day]
datetime_select('post', 'updated_at', :locale => 'en')
end
def test_date_or_time_select_given_invalid_order
- I18n.expects(:translate).with(:'date.order', :locale => 'en').returns [:invalid, :month, :day]
+ I18n.expects(:translate).with(:'date.order', :locale => 'en', :default => []).returns [:invalid, :month, :day]
assert_raise StandardError do
datetime_select('post', 'updated_at', :locale => 'en')