FIX broken spec

This commit is contained in:
Sam Saffron 2014-05-27 13:52:39 +10:00
parent e91f944851
commit 330ea82ce4
1 changed files with 5 additions and 11 deletions

View File

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