Stubbing Paperclip calls to Amazon S3 (for Rspec)

34 views
Skip to first unread message

Neil Cauldwell

unread,
Sep 17, 2008, 3:09:58 PM9/17/08
to rubyonra...@googlegroups.com
Would anyone happen to know how to stub a call to S3 from Paperclip?
I've searched every where and no one seems to have posted anything about
this. I've done very little in the way of spec'ing dependencies on
external services, so any ideas on how to do this with Paperclip & S3
would be most appreciated. I'm happy with stubbing out Thinking Sphinx -
would Paperclip be much different to this (?);

def do_get
ThinkingSphinx::Search.stub!(:search).and_return(users)
get :index, :search => "bob"
end

Thanks
--
Posted via http://www.ruby-forum.com/.

Neil Cauldwell

unread,
Sep 20, 2008, 8:53:04 AM9/20/08
to rubyonra...@googlegroups.com

If anyone can answer this I'll draw them portrait with the pack of
crayola crayons my Gran just bought me. You won't believe how good I can
make you look.

Reply all
Reply to author
Forward
0 new messages