Fix rpspec styub deprecated syntax

This commit is contained in:
Senén Rodero Rodríguez
2017-09-25 10:50:12 +02:00
parent f6fba64012
commit 92f66a6db9

View File

@@ -41,7 +41,7 @@ shared_examples "image validations" do |imageable_factory|
end
it "should not be valid for attachments larger than imageable max_file_size definition" do
image.stub(:attachment_file_size).and_return(Image::MAX_IMAGE_SIZE + 1.byte)
allow(image).to receive(:attachment_file_size).and_return(Image::MAX_IMAGE_SIZE + 1.byte)
expect(image).to_not be_valid
expect(image.errors[:attachment]).to include "must be in between 0 Bytes and 1 MB"