FIX broken spec

This commit is contained in:
Sam Saffron 2014-05-27 13:52:39 +10:00
parent e91f944851
commit 330ea82ce4

View file

@ -47,15 +47,11 @@ describe CookedPostProcessor do
before { cpp.post_process_images }
it "adds the width from the image sizes provided when no dimension is provided" do
it "works" do
# adds the width from the image sizes provided when no dimension is provided
cpp.html.should =~ /src="http:\/\/foo.bar\/image.png" width="111" height="222"/
end
it "adds the width from the image sizes provided" do
# adds the width from the image sizes provided
cpp.html.should =~ /src="http:\/\/domain.com\/picture.jpg" width="50" height="42"/
end
it "should be dirty" do
cpp.should be_dirty
end
@ -87,11 +83,9 @@ describe CookedPostProcessor do
Upload.expects(:get_from_url).returns(upload)
FastImage.stubs(:size).returns([1000, 2000])
# optimized_image
FileUtils.stubs(:mkdir_p)
File.stubs(:open)
# hmmm this should be done in a cleaner way
OptimizedImage.any_instance.expects(:resize).returns(true)
OptimizedImage.expects(:resize).returns(true)
end
it "generates overlay information" do