[rspec-users] How are people speccing and cuke-ing Paperclip (with S3)?

Ashley Moran ashley.moran at patchspace.co.uk
Sat Jul 17 13:52:45 EDT 2010

On 17 Jul 2010, at 5:43 PM, doug livesey wrote:

> Please tell me they're doing *some*thing, as I'm using S3 storage, which would really slow my tests down if I just did nothing.
> I'm starting to think of all sorts of horrible solutions, like making the storage strategy dependent on the environment, like using the file system if it is a test or cucumber env.

For absolute confidence, you can use S3 for a full integration test.  You only need one of these for each type of interaction with S3 though.

For faster local integration tests, you could write a mock implementation of S3.

I've not used Paperclip, but it looks like it works as a DSL embedded into ActiveRecord class definitions.  That'll make it a lot harder to separate out the file handling that if you were writing it out explicitly.



More information about the rspec-users mailing list