diff --git a/test/compatibility_stamping_tests.rb b/test/compatibility_stamping_test.rb similarity index 91% rename from test/compatibility_stamping_tests.rb rename to test/compatibility_stamping_test.rb index 29be528..4a88dee 100644 --- a/test/compatibility_stamping_tests.rb +++ b/test/compatibility_stamping_test.rb @@ -15,7 +15,7 @@ def setup end def test_comment_creation_with_stamped_object - assert_equal @delynn.id, Person.stamper + assert_equal @delynn, Person.stamper comment = Comment.create(:comment => "Test Comment") assert_equal @delynn.id, comment.created_by @@ -26,7 +26,7 @@ def test_comment_creation_with_stamped_object def test_comment_creation_with_stamped_integer Person.stamper = 2 - assert_equal 2, Person.stamper + assert_equal 2, Person.stamper.id comment = Comment.create(:comment => "Test Comment - 2") assert_equal @nicole.id, comment.created_by @@ -37,7 +37,7 @@ def test_comment_creation_with_stamped_integer def test_comment_updating_with_stamped_object Person.stamper = @nicole - assert_equal @nicole.id, Person.stamper + assert_equal @nicole, Person.stamper @first_comment.comment << " - Updated" @first_comment.save @@ -50,7 +50,7 @@ def test_comment_updating_with_stamped_object def test_comment_updating_with_stamped_integer Person.stamper = 2 - assert_equal 2, Person.stamper + assert_equal 2, Person.stamper.id @first_comment.comment << " - Updated" @first_comment.save diff --git a/test/stamping_tests.rb b/test/stamping_test.rb similarity index 90% rename from test/stamping_tests.rb rename to test/stamping_test.rb index d6850a8..942bfb8 100644 --- a/test/stamping_tests.rb +++ b/test/stamping_test.rb @@ -15,7 +15,7 @@ def setup end def test_person_creation_with_stamped_object - assert_equal @zeus.id, User.stamper + assert_equal @zeus, User.stamper person = Person.create(:name => "David") assert_equal @zeus.id, person.creator_id @@ -26,7 +26,7 @@ def test_person_creation_with_stamped_object def test_person_creation_with_stamped_integer User.stamper = 2 - assert_equal 2, User.stamper + assert_equal 2, User.stamper.id person = Person.create(:name => "Daniel") assert_equal @hera.id, person.creator_id @@ -36,7 +36,7 @@ def test_person_creation_with_stamped_integer end def test_post_creation_with_stamped_object - assert_equal @delynn.id, Person.stamper + assert_equal @delynn, Person.stamper post = Post.create(:title => "Test Post - 1") assert_equal @delynn.id, post.creator_id @@ -47,7 +47,7 @@ def test_post_creation_with_stamped_object def test_post_creation_with_stamped_integer Person.stamper = 2 - assert_equal 2, Person.stamper + assert_equal 2, Person.stamper.id post = Post.create(:title => "Test Post - 2") assert_equal @nicole.id, post.creator_id @@ -58,7 +58,7 @@ def test_post_creation_with_stamped_integer def test_person_updating_with_stamped_object User.stamper = @hera - assert_equal @hera.id, User.stamper + assert_equal @hera, User.stamper @delynn.name << " Berry" @delynn.save @@ -71,7 +71,7 @@ def test_person_updating_with_stamped_object def test_person_updating_with_stamped_integer User.stamper = 2 - assert_equal 2, User.stamper + assert_equal 2, User.stamper.id @delynn.name << " Berry" @delynn.save @@ -84,7 +84,7 @@ def test_person_updating_with_stamped_integer def test_post_updating_with_stamped_object Person.stamper = @nicole - assert_equal @nicole.id, Person.stamper + assert_equal @nicole, Person.stamper @first_post.title << " - Updated" @first_post.save @@ -97,7 +97,7 @@ def test_post_updating_with_stamped_object def test_post_updating_with_stamped_integer Person.stamper = 2 - assert_equal 2, Person.stamper + assert_equal 2, Person.stamper.id @first_post.title << " - Updated" @first_post.save diff --git a/test/userstamp_controller_tests.rb b/test/userstamp_controller_test.rb similarity index 100% rename from test/userstamp_controller_tests.rb rename to test/userstamp_controller_test.rb