1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

pass the correct argument to mock on a test of validates_length_of

This commit is contained in:
yuuji.yaginuma 2015-07-28 22:59:42 +09:00
parent e18bf1dc49
commit 0a20e48d52

View file

@ -101,7 +101,7 @@ class I18nValidationTest < ActiveModel::TestCase
Person.validates_length_of :title, validation_options.merge(within: 3..5)
@person.title = 'this title is too long'
call = [:title, :too_long, generate_message_options.merge(count: 5)]
assert_called_with(@person.errors, :generate_message, ) do
assert_called_with(@person.errors, :generate_message, call) do
@person.valid?
end
end