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.

Ash

-- 
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran



_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to