test/backend/chain_test.rb in i18n-0.8.1 vs test/backend/chain_test.rb in i18n-0.8.3
- old
+ new
@@ -37,13 +37,13 @@
assert_equal 'Bar', I18n.t(:bar, :default => 'Bah')
assert_equal 'Bah', I18n.t(:bah, :default => 'Bah') # default kicks in only here
end
test "default" do
- assert_equal 'Fuh', I18n.t(:default => 'Fuh')
- assert_equal 'Zero', I18n.t(:default => { :zero => 'Zero' }, :count => 0)
- assert_equal({ :zero => 'Zero' }, I18n.t(:default => { :zero => 'Zero' }))
- assert_equal 'Foo', I18n.t(:default => :foo)
+ assert_equal 'Fuh', I18n.t(:does_not_exist, :default => 'Fuh')
+ assert_equal 'Zero', I18n.t(:does_not_exist, :default => { :zero => 'Zero' }, :count => 0)
+ assert_equal({ :zero => 'Zero' }, I18n.t(:does_not_exist, :default => { :zero => 'Zero' }))
+ assert_equal 'Foo', I18n.t(:does_not_exist, :default => :foo)
end
test 'default is returned if translation is missing' do
assert_equal({}, I18n.t(:'i18n.transliterate.rule', :locale => 'en', :default => {}))
end