test/api/tests/localization/date_time.rb in i18n-0.3.6.pre vs test/api/tests/localization/date_time.rb in i18n-0.3.6
- old
+ new
@@ -45,13 +45,13 @@
define_method "test localize DateTime: given a meridian indicator format it returns the correct meridian indicator" do
assert_equal 'am', I18n.l(@datetime, :format => '%p', :locale => :de)
assert_equal 'pm', I18n.l(@other_datetime, :format => '%p', :locale => :de)
end
- define_method "test localize Date: given a format that resolves to a Proc it calls the Proc with the object" do
+ define_method "test localize DateTime: given a format that resolves to a Proc it calls the Proc with the object" do
if can_store_procs?
- assert_equal '[Sat, 01 Mar 2008 06:00:00 +0000, {}]', I18n.l(@datetime, :format => :proc, :locale => :de)
+ assert_equal '[:"time.formats.proc", {}]', I18n.l(@datetime, :format => :proc, :locale => :de)
end
end
# TODO fails, but something along these lines probably should pass
# define_method "test localize DateTime: given a format that resolves to a Proc it calls the Proc with the object and extra options" do
@@ -77,10 +77,11 @@
:short => "%d. %b %H:%M",
:long => "%d. %B %Y %H:%M",
:long_ordinalized => lambda { |date, options|
tz = " (#{options[:timezone]})" if options[:timezone]
"#{date.day}ter %B %Y, %H:%M Uhr#{tz}"
- }
+ },
+ :proc => lambda { |*args| args.inspect }
},
:am => 'am',
:pm => 'pm'
}
}