Hi, I'm trying to test the deletion of an image associated with a user profile with Paperclip that is liked to an S3 bucket. I don't actually want the test to hit S3 though, is there a way to do this in Minitest?
Here is a SO post with the code that I've tried http://stackoverflow.com/questions/43760246/minitest-test-for-removing-paperclip-image-linked-to-s3-without-actually-upload
stub.proxy(MyClass).new(campaigns_id: 1, user: user) do |obj|
# obj.respond_to?(:call).must_equal true # I need to call respond_to?, because otherwise test would pass, even if real MyClass-instances call method was renamed, removed, ...
stub(obj).call { i_result }
end