Re: [rspec-users] Testing file attachment with Paperclip

2010-01-28 Thread Deven Patel
Nicholas Wieland wrote: > 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!( :h

Re: [rspec-users] Testing file attachment with Paperclip

2010-01-28 Thread Deven Patel
Nicholas Wieland wrote: > 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!( :h

Re: [rspec-users] Testing file attachment with Paperclip

2009-01-17 Thread Nick Hoffman
On 2009-01-17, at 05:10, Fernando Perez wrote: G'day again Fernando. IIRC, Paperclip's #save_attached_files is what takes care of saving the attachment to disk, uploading it to S3, etc. Here's a small gist that tests the allowance of JPG files, and ensures that the file isn't saved [to disk, f

Re: [rspec-users] Testing file attachment with Paperclip

2009-01-17 Thread Fernando Perez
> G'day again Fernando. IIRC, Paperclip's #save_attached_files is what > takes care of saving the attachment to disk, uploading it to S3, etc. > Here's a small gist that tests the allowance of JPG files, and ensures > that the file isn't saved [to disk, for me]: > http://gist.github.com/48264 > >

Re: [rspec-users] Testing file attachment with Paperclip

2009-01-16 Thread Nick Hoffman
On 2009-01-16, at 17:42, Fernando Perez wrote: Nicholas Wieland wrote: 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 ...

Re: [rspec-users] Testing file attachment with Paperclip

2009-01-16 Thread Fernando Perez
Nicholas Wieland wrote: > 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!( :h

Re: [rspec-users] Testing file attachment with Paperclip

2008-09-06 Thread Neil Cauldwell
Rick Denatale wrote: > On Mon, Jun 9, 2008 at 8:18 AM, Nicholas Wieland > <[EMAIL PROTECTED]> > wrote: > >>> >> >> I haven't been clear enough, my point is not to fake the file upload >> (there's also fixture_file_upload for that) but to fake the receiver, making >> it dumb enough to avoid perfor

Re: [rspec-users] Testing file attachment with Paperclip

2008-06-09 Thread Rick DeNatale
On Mon, Jun 9, 2008 at 8:18 AM, Nicholas Wieland <[EMAIL PROTECTED]> wrote: > Il giorno 09/giu/08, alle ore 14:11, David Chelimsky ha scritto: > > On Jun 9, 2008, at 7:05 AM, Nicholas Wieland wrote: >> >> Does someone have an example on faking a file upload for just ensuring it >>> gets called >

Re: [rspec-users] Testing file attachment with Paperclip

2008-06-09 Thread Nicholas Wieland
Il giorno 09/giu/08, alle ore 14:11, David Chelimsky ha scritto: On Jun 9, 2008, at 7:05 AM, Nicholas Wieland wrote: Does someone have an example on faking a file upload for just ensuring it gets called http://talklikeaduck.denhaven2.com/articles/2008/04/18/rails-integration-test-file-uploa

Re: [rspec-users] Testing file attachment with Paperclip

2008-06-09 Thread David Chelimsky
On Jun 9, 2008, at 7:05 AM, Nicholas Wieland wrote: Does someone have an example on faking a file upload for just ensuring it gets called http://talklikeaduck.denhaven2.com/articles/2008/04/18/rails-integration-test-file-upload-plugin Cheers, David ___

[rspec-users] Testing file attachment with Paperclip

2008-06-09 Thread Nicholas Wieland
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 ).an