From 5a35873f8a12915d44cfa77239d094960ce6971e Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 18 Dec 2012 14:05:28 +0100 Subject: only destroy user that has been persisted in teardown --- users/test/unit/email_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/test/unit/email_test.rb b/users/test/unit/email_test.rb index 5aa2b11..6f9beaa 100644 --- a/users/test/unit/email_test.rb +++ b/users/test/unit/email_test.rb @@ -14,7 +14,7 @@ class EmailTest < ActiveSupport::TestCase teardown do @user.destroy if @user.persisted? # just in case - @other_user.destroy + @other_user.destroy if @other_user.persisted? end -- cgit v1.2.3