From 39a246f545a714b21c669e2f6eda4012526c3874 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Wed, 19 May 2010 15:14:51 -0400 Subject: Final iteration of use better testing methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [#4652 state:resolved] Signed-off-by: José Valim --- activerecord/test/cases/timestamp_test.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'activerecord/test/cases/timestamp_test.rb') diff --git a/activerecord/test/cases/timestamp_test.rb b/activerecord/test/cases/timestamp_test.rb index 24b237a72b..549c4af6b1 100644 --- a/activerecord/test/cases/timestamp_test.rb +++ b/activerecord/test/cases/timestamp_test.rb @@ -15,26 +15,26 @@ class TimestampTest < ActiveRecord::TestCase @developer.name = "Jack Bauer" @developer.save! - assert @previously_updated_at != @developer.updated_at + assert_not_equal @previously_updated_at, @developer.updated_at end def test_saving_a_unchanged_record_doesnt_update_its_timestamp @developer.save! - assert @previously_updated_at == @developer.updated_at + assert_equal @previously_updated_at, @developer.updated_at end def test_touching_a_record_updates_its_timestamp @developer.touch - assert @previously_updated_at != @developer.updated_at + assert_not_equal @previously_updated_at, @developer.updated_at end def test_touching_a_different_attribute previously_created_at = @developer.created_at @developer.touch(:created_at) - assert previously_created_at != @developer.created_at + assert_not_equal previously_created_at, @developer.created_at end def test_saving_a_record_with_a_belongs_to_that_specifies_touching_the_parent_should_update_the_parent_updated_at @@ -45,7 +45,7 @@ class TimestampTest < ActiveRecord::TestCase pet.name = "Fluffy the Third" pet.save - assert previously_owner_updated_at != pet.owner.updated_at + assert_not_equal previously_owner_updated_at, pet.owner.updated_at end def test_destroying_a_record_with_a_belongs_to_that_specifies_touching_the_parent_should_update_the_parent_updated_at @@ -55,7 +55,7 @@ class TimestampTest < ActiveRecord::TestCase pet.destroy - assert previously_owner_updated_at != pet.owner.updated_at + assert_not_equal previously_owner_updated_at, pet.owner.updated_at end def test_saving_a_record_with_a_belongs_to_that_specifies_touching_a_specific_attribute_the_parent_should_update_that_attribute @@ -68,8 +68,8 @@ class TimestampTest < ActiveRecord::TestCase pet.name = "Fluffy the Third" pet.save - assert previously_owner_happy_at != pet.owner.happy_at + assert_not_equal previously_owner_happy_at, pet.owner.happy_at ensure Pet.belongs_to :owner, :touch => true end -end \ No newline at end of file +end -- cgit v1.2.3