spec/unit/attachment/maybe_spec.rb in bulldog-0.1.1 vs spec/unit/attachment/maybe_spec.rb in bulldog-0.2.0
- old
+ new
@@ -127,22 +127,14 @@
end
end
describe "#reload" do
before do
- thing = Thing.create(:photo => test_file('test.png'))
- @thing = Thing.find(thing.id)
- end
-
- it "should update the file size stored attribute from the file" do
- FileUtils.cp(test_path('test2.jpg'), @thing.photo.path(:original))
+ @thing = Thing.create!(:photo => uploaded_file('test.png'))
+ FileUtils.cp("#{ROOT}/spec/data/test.jpg", @thing.photo.path(:original))
@thing.photo.reload
- @thing.photo_file_size.should == File.size(test_path('test2.jpg'))
end
- it "should reload the content type stored attribute from the file" do
- FileUtils.cp(test_path('test.png'), @thing.photo.path(:original))
- @thing.photo.reload
- @thing.photo_content_type.should =~ %r'image/png'
- end
+ it "should update the file size stored attribute from the file"
+ it "should reload the content type stored attribute from the file"
end
end