Sha256: 7ee49d25c43d6daa9cfd0dd3a0c050bccaec4686ac45ea873dd3f55ecf63d0ec
Contents?: true
Size: 854 Bytes
Versions: 11
Compression:
Stored size: 854 Bytes
Contents
require 'test_helper' class TranslationTest < Test::Unit::TestCase should "translate add mongo_mapper translations" do I18n.translate("mongo_mapper.errors.messages.taken").should == "has already been taken" end should "set i18n_scope" do Doc().i18n_scope.should == :mongo_mapper end should "translate document attributes" do I18n.config.backend.store_translations(:en, :mongo_mapper => {:attributes => {:thing => {:foo => 'Bar'}}}) doc = Doc('Thing') do key :foo, String end doc.human_attribute_name(:foo).should == 'Bar' end should "translate embedded document attributes" do I18n.config.backend.store_translations(:en, :mongo_mapper => {:attributes => {:thing => {:foo => 'Bar'}}}) doc = EDoc('Thing') do key :foo, String end doc.human_attribute_name(:foo).should == 'Bar' end end
Version data entries
11 entries across 11 versions & 3 rubygems