spec/unit/has_attachment_spec.rb in bulldog-0.1.0 vs spec/unit/has_attachment_spec.rb in bulldog-0.1.1

- old
+ new

@@ -333,9 +333,20 @@ instantiate @thing.photo_file_name.should == 'test.jpg' @thing.photo_content_type == "image/jpeg" @thing.photo_file_size.should == File.size(test_path('test.jpg')) end + + describe "when the record is saved" do + before do + instantiate + end + + it "should not create any files" do + @thing.save + File.should_not exist(@thing.photo.path(:original)) + end + end end end describe "when the record exists and there is no attachment" do before do