diff options
author | Norman Clarke <norman@njclarke.com> | 2011-03-15 10:06:53 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-03-15 10:44:14 -0300 |
commit | 7bd70dcd6c62fb94e3298e926f69a4e1946739cc (patch) | |
tree | f703d986e8d86d1cc2ce1c4943963869770ffefc /activemodel/lib/active_model | |
parent | 9f2706d770a2a5513d54dac9d0fb536f787a434b (diff) | |
download | rails-7bd70dcd6c62fb94e3298e926f69a4e1946739cc.tar.gz rails-7bd70dcd6c62fb94e3298e926f69a4e1946739cc.tar.bz2 rails-7bd70dcd6c62fb94e3298e926f69a4e1946739cc.zip |
Add messages to plain assertions.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/lint.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/lint.rb b/activemodel/lib/active_model/lint.rb index 957d1b9d70..35e216ac6b 100644 --- a/activemodel/lib/active_model/lint.rb +++ b/activemodel/lib/active_model/lint.rb @@ -23,7 +23,7 @@ module ActiveModel 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 @@ module ActiveModel 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> |