Skip to content

Commit

Permalink
Use empty StringIO to mocked value in GeometryValidator spec
Browse files Browse the repository at this point in the history
Pass empty StringIO to avoid exception from `ImageSize.new`
  • Loading branch information
unasuke committed Jan 27, 2022
1 parent b5c3772 commit 0c61832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/mini_paperclip/validators/geometry_validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
f.binmode
mock = double('Record')
attachment = double('Attachment')
allow(attachment).to receive(:waiting_write_file).and_return(f)
allow(attachment).to receive(:waiting_write_file).and_return(StringIO.new)
expect(mock).to_not receive(:errors)
validator.validate_each(mock, :img, attachment)
end
Expand Down

0 comments on commit 0c61832

Please sign in to comment.