Skip to content

Commit

Permalink
Remember to destroy attachments after tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
chewi committed Apr 20, 2012
1 parent f130bb8 commit d66b9a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/models/attachment_file_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require 'test_helper'

class AttachmentFileTest < ActiveSupport::TestCase
def teardown
@attachment.destroy rescue nil
end

test "Set file content_type and size" do
@attachment = create_attachment

Expand Down
4 changes: 4 additions & 0 deletions test/models/picture_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require 'test_helper'

class PictureTest < ActiveSupport::TestCase
def teardown
@picture.destroy rescue nil
end

test "Set file content_type and size" do
@picture = create_picture

Expand Down

0 comments on commit d66b9a2

Please sign in to comment.