... 48 49 50 51 52 53 54 ... 56 57 58 59 60 61 62 |
... 48 49 50 51 52 53 54 ... 56 57 58 59 60 61 62 |
0 @@ -48,7 +48,7 @@ class ActiveRecordValidationsI18nTests < Test::Unit::TestCase 0 I18n.expects(:translate).with(:topic, {:count => 1, :default => ['Topic'], :scope => [:activerecord, :models]}).returns('Topic') 0 I18n.expects(:translate).with(:'topic.title', {:count => 1, :default => ['Title'], :scope => [:activerecord, :attributes]}).returns('Title') 0 - I18n.expects(:translate).with(:"custom.topic.title.invalid", : scope => global_scope, :default => [:"custom.topic.invalid", 'default from class def error 1', :invalid], :attribute => "Title", :model => "Topic").returns('default from class def error 1') 0 + I18n.expects(:translate).with(:"custom.topic.title.invalid", : value => nil, :scope => global_scope, :default => [:"custom.topic.invalid", 'default from class def error 1', :invalid], :attribute => "Title", :model => "Topic").returns('default from class def error 1') 0 @topic.errors.generate_message :title, :invalid, :default => 'default from class def error 1' 0 @@ -56,7 +56,7 @@ class ActiveRecordValidationsI18nTests < Test::Unit::TestCase 0 custom_scope = [:activerecord, :errors, :custom, 'topic', :title] 0 I18n.expects(:translate).with(:reply, {:count => 1, :default => [:topic, 'Reply'], :scope => [:activerecord, :models]}).returns('Reply') 0 I18n.expects(:translate).with(:'reply.title', {:count => 1, :default => [:'topic.title', 'Title'], :scope => [:activerecord, :attributes]}).returns('Title') 0 - I18n.expects(:translate).with(:"custom.reply.title.invalid", : scope => [:activerecord, :errors, :messages], :default => [:"custom.reply.invalid", :"custom.topic.title.invalid", :"custom.topic.invalid", 'default from class def', :invalid], :model => 'Reply', :attribute => 'Title').returns("default from class def") 0 + I18n.expects(:translate).with(:"custom.reply.title.invalid", : value => nil, :scope => [:activerecord, :errors, :messages], :default => [:"custom.reply.invalid", :"custom.topic.title.invalid", :"custom.topic.invalid", 'default from class def', :invalid], :model => 'Reply', :attribute => 'Title').returns("default from class def") 0 Reply.new.errors.generate_message :title, :invalid, :default => 'default from class def'
|