diff options
author | Hemant Kumar <hkumar@crri.co.in> | 2011-01-05 17:26:25 +0530 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-01-05 13:18:10 +0100 |
commit | 8de5595e4d101a53f33ae8c48837855d8594f320 (patch) | |
tree | 7c64f2232d7a978ada41f40d810d5167eec05cd0 /activemodel/test | |
parent | 5c666779872e6702f4d826686eab09db37cba062 (diff) | |
download | rails-8de5595e4d101a53f33ae8c48837855d8594f320.tar.gz rails-8de5595e4d101a53f33ae8c48837855d8594f320.tar.bz2 rails-8de5595e4d101a53f33ae8c48837855d8594f320.zip |
fix difference between behaviour of blank and empty
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/errors_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/test/cases/errors_test.rb b/activemodel/test/cases/errors_test.rb index 27821c333b..8cb8f7ba44 100644 --- a/activemodel/test/cases/errors_test.rb +++ b/activemodel/test/cases/errors_test.rb @@ -25,7 +25,13 @@ class ErrorsTest < ActiveModel::TestCase def self.lookup_ancestors [self] end + end + test "should return true if no errors" do + person = Person.new + person.errors[:foo] + assert person.errors.empty? + assert person.errors.blank? end test "method validate! should work" do |