Permalink
Browse files

Clean up files after each example

  • Loading branch information...
tmaier committed Dec 30, 2012
1 parent fc240c0 commit 46a95456cd555c3a1daaa2275b79564a5c61d9a8
Showing with 16 additions and 0 deletions.
  1. +16 −0 spec/image_sorcery_examples_spec.rb
@@ -7,6 +7,22 @@
Sorcery.send(new_instance_method, "./spec/fixtures/dog-2.jpeg") # Who doesn't love dogs?
end
+ after :each do
+ [
+ "new_image.png",
+ "./spec/fixtures/dog-2.jpeg",
+ "./spec/fixtures/dog-2.png",
+ "./spec/fixtures/pdf-sample-2.pdf",
+ "./spec/fixtures/pdf-sample-2.png",
+ "./spec/fixtures/pdf-sample-2-0.png",
+ "./spec/fixtures/pdf-sample-2-1.png",
+ "./spec/fixtures/pdf-sample-2.png.0",
+ "./spec/fixtures/pdf-sample-2.png.1"
+ ].each do |file|
+ File.exists?(file) && File.delete(file)
+ end
+ end
+
describe "getting the dimensions of an image" do
it "returns a hash of dimensions" do
image.dimensions.should == {:x => 160, :y => 120}

0 comments on commit 46a9545

Please sign in to comment.