Created
August 4, 2009 16:08
-
-
Save kares/161328 to your computer and use it in GitHub Desktop.
globalize2 bug tracking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#test "makes sure interpolation does not break even with False as string" do | |
# assert_equal "translation missing: en, support, array, skip_last_comma", I18n.translate(:"support.array.skip_last_comma") | |
#end | |
test "returns missing translation string for missing key" do | |
assert_equal "translation missing: hu, foo, bar, huu", I18n.translate(:"foo.bar.huu", :locale => :hu) | |
end | |
test "returns false translation" do | |
I18n.backend.store_translations :hu, { :support => { :array => { :skip_last_comma => false } } } | |
assert_equal false, I18n.translate(:"support.array.skip_last_comma", :locale => :hu) | |
end | |
test "returns true translation" do | |
I18n.backend.store_translations :hu, { :support => { :array => { :skip_last_comma => true } } } | |
assert_equal true, I18n.translate(:'support.array.skip_last_comma', :locale => :hu) | |
end | |
test "returns an array of symbols as string" do | |
# used in DateHelper.translated_date_order (action_pack/lib/action_view/helpers/date_helper.rb) | |
date_order = I18n.translate(:'date.order') # [:year, :month, :day] | |
assert_instance_of Array, date_order | |
date_order.each { |elem| assert_instance_of Symbol, elem } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment