Permalink
Browse files

Ensure file creation specs clean up after themselves.

  • Loading branch information...
1 parent c8bc1c6 commit ed89dc4e8374f3c220e741ea820d9d40e37bfed1 @parndt parndt committed Apr 6, 2011
Showing with 10 additions and 0 deletions.
  1. +5 −0 images/spec/models/image_spec.rb
  2. +5 −0 resources/spec/models/resource_spec.rb
@@ -19,6 +19,11 @@ def image_can_be_destroyed
before(:each) do
reset_image
end
+
+ # clean up after ourselves.
+ after(:each) do
+ Image.destroy_all
+ end
context "with valid attributes" do
it "should create successfully" do
@@ -20,6 +20,11 @@ def resource_can_be_destroyed
reset_resource
end
+ # clean up after ourselves.
+ after(:each) do
+ Resource.destroy_all
+ end
+
context "with valid attributes" do
it "should create successfully" do
@resource.errors.empty?

0 comments on commit ed89dc4

Please sign in to comment.