Permalink
Browse files

Add messages to plain assertions.

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information...
norman authored and spastorino committed Mar 15, 2011
1 parent 9f2706d commit 7bd70dcd6c62fb94e3298e926f69a4e1946739cc
Showing with 2 additions and 2 deletions.
  1. +2 −2 activemodel/lib/active_model/lint.rb
@@ -23,7 +23,7 @@ module Tests
def test_to_key
assert model.respond_to?(:to_key), "The model should respond to to_key"
def model.persisted?() false end
- assert model.to_key.nil?
+ assert model.to_key.nil?, "to_key should return nil when `persisted?` returns false"
end
# == Responds to <tt>to_param</tt>
@@ -40,7 +40,7 @@ def test_to_param
assert model.respond_to?(:to_param), "The model should respond to to_param"
def model.to_key() [1] end
def model.persisted?() false end
- assert model.to_param.nil?
+ assert model.to_param.nil?, "to_param should return nil when `persited?` returns false"
end
# == Responds to <tt>valid?</tt>

0 comments on commit 7bd70dc

Please sign in to comment.