spec/upload_spec.rb in carrierwave-upyun-0.1.5 vs spec/upload_spec.rb in carrierwave-upyun-0.1.6
- old
+ new
@@ -44,13 +44,15 @@
end
context "Upload Image" do
it "does upload image" do
f = load_file("foo.jpg")
- photo = Photo.create(:image => f)
- photo.errors.count.should == 0
- open(photo.image.url).should_not == nil
- open(photo.image.url).size.should == f.size
- open(photo.image.small.url).should_not == nil
+ puts Benchmark.measure {
+ @photo = Photo.create(:image => f)
+ }
+ @photo.errors.count.should == 0
+ open(@photo.image.url).should_not == nil
+ open(@photo.image.url).size.should == f.size
+ open(@photo.image.small.url).should_not == nil
end
end
-end
\ No newline at end of file
+end