aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-05-16 10:37:57 -0300
committerJosé Valim <jose.valim@gmail.com>2010-05-16 16:06:28 +0200
commitfdfebb7782a399839ac9a9e63d5153565d6f88f4 (patch)
treeee9f66914f8ebc60ff2c24fd9e375fee08c9fcc7 /activemodel
parentd7a3e65c50c5e8c0a7a37a59d6244c0e91fda629 (diff)
downloadrails-fdfebb7782a399839ac9a9e63d5153565d6f88f4.tar.gz
rails-fdfebb7782a399839ac9a9e63d5153565d6f88f4.tar.bz2
rails-fdfebb7782a399839ac9a9e63d5153565d6f88f4.zip
Make use of assert_equal to test equallity between object assert expects and object and a message of error
[#4611 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/test/cases/validations/validates_test.rb4
-rw-r--r--activemodel/test/cases/validations_test.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/test/cases/validations/validates_test.rb b/activemodel/test/cases/validations/validates_test.rb
index d15fb4a524..b85e491a9c 100644
--- a/activemodel/test/cases/validations/validates_test.rb
+++ b/activemodel/test/cases/validations/validates_test.rb
@@ -45,7 +45,7 @@ class ValidatesTest < ActiveModel::TestCase
Person.validates :karma, :presence => true, :email => true, :if => :condition_is_true
person = Person.new
person.valid?
- assert ["can't be blank", "is not an email"], person.errors[:karma].sort
+ assert_equal ["can't be blank", "is not an email"], person.errors[:karma].sort
end
def test_validates_with_unless_shared_conditions
@@ -111,4 +111,4 @@ class ValidatesTest < ActiveModel::TestCase
person.valid?
assert_equal ['Local validator please'], person.errors[:title]
end
-end \ No newline at end of file
+end
diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb
index aa75b8b0d2..af195af080 100644
--- a/activemodel/test/cases/validations_test.rb
+++ b/activemodel/test/cases/validations_test.rb
@@ -228,7 +228,7 @@ class ValidationsTest < ActiveModel::TestCase
t = Topic.new
assert t.invalid?
- assert ["NO BLANKS HERE"], t.errors[:title]
+ assert_equal ["NO BLANKS HERE"], t.errors[:title]
end
def test_list_of_validators_for_model