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
1 changed files with 1 additions and 1 deletions

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