From fdfebb7782a399839ac9a9e63d5153565d6f88f4 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sun, 16 May 2010 10:37:57 -0300 Subject: Make use of assert_equal to test equallity between object assert expects and object and a message of error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [#4611 state:committed] Signed-off-by: José Valim --- activemodel/test/cases/validations/validates_test.rb | 4 ++-- activemodel/test/cases/validations_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'activemodel/test/cases') 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 -- cgit v1.2.3