aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-12-01 21:41:41 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-12-01 21:41:41 -0800
commitdf1484ced51646624c8c602f5a00d6e906c5ca1b (patch)
tree2c62778cecad5797a102759a4099b04ad93e8b2c /activemodel
parenta7776924a67d32067b2c1ecb9ca773c96a33da63 (diff)
parentcc62ec1e8cac92acbb3cbcfe0d9941d4c084a226 (diff)
downloadrails-df1484ced51646624c8c602f5a00d6e906c5ca1b.tar.gz
rails-df1484ced51646624c8c602f5a00d6e906c5ca1b.tar.bz2
rails-df1484ced51646624c8c602f5a00d6e906c5ca1b.zip
Merge pull request #8398 from rmascarenhas/active-model-errors-spec-fixes
ActiveModel::Errors spec fixes
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/test/cases/errors_test.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activemodel/test/cases/errors_test.rb b/activemodel/test/cases/errors_test.rb
index 293ce07f4e..1ffce1ae47 100644
--- a/activemodel/test/cases/errors_test.rb
+++ b/activemodel/test/cases/errors_test.rb
@@ -116,7 +116,7 @@ class ErrorsTest < ActiveModel::TestCase
test "added? should default message to :invalid" do
person = Person.new
- person.errors.add(:name, :invalid)
+ person.errors.add(:name)
assert person.errors.added?(:name)
end
@@ -161,7 +161,7 @@ class ErrorsTest < ActiveModel::TestCase
person = Person.new
person.errors.add(:name, "can not be blank")
person.errors.add(:name, "can not be nil")
- assert_equal ["name can not be blank", "name can not be nil"], person.errors.to_a
+ assert_equal ["name can not be blank", "name can not be nil"], person.errors.full_messages
end
test 'full_message should return the given message if attribute equals :base' do
@@ -240,4 +240,3 @@ class ErrorsTest < ActiveModel::TestCase
person.errors.add_on_blank :name, :message => 'custom'
end
end
-