[rspec-users] Testing file attachment with Paperclip
nicholas.wieland at gmail.com
Mon Jun 9 08:05:47 EDT 2008
Does someone have an example on faking a file upload for just ensuring
it gets called, without actually uploading the file to s3.
I thought that stubbing Model.has_attached_file would be enough, but
it doesn't seem so ...
This is what I did:
Video.stub!( :has_attached_file ).with( :name ).and_return( true )
has_attached_file is from paperclip, it gets mixed to the model.
RightAws::AwsError in 'VideosController should create a valid Video'
AWS access keys are required to operate on S3
Maybe I missed something ?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2435 bytes
Desc: not available
More information about the rspec-users