Skip to content

Commit

Permalink
Merge pull request rails#18118 from vipulnsward/fix-validation-message
Browse files Browse the repository at this point in the history
Validation test fixes
  • Loading branch information
carlosantoniodasilva committed Dec 21, 2014
2 parents c9a953a + 732bba8 commit 060bf50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions activemodel/test/cases/validations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,8 @@ def test_invalid_options_to_validate
# A common mistake -- we meant to call 'validates'
Topic.validate :title, presence: true
end
message = 'Unknown key: :presence. Valid keys are: :on, :if, :unless. Perhaps you meant to call `validates` instead of `validate`?'
assert_includes error.message, "Unknown key: :presence"
assert_includes error.message, "Perhaps you meant to call `validates` instead of `validate`?"
message = 'Unknown key: :presence. Valid keys are: :on, :if, :unless, :prepend. Perhaps you meant to call `validates` instead of `validate`?'
assert_equal message, error.message
end

def test_callback_options_to_validate
Expand Down

0 comments on commit 060bf50

Please sign in to comment.