Stubbing Paperclip calls to Amazon S3 (for Rspec)

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

Neil C. wrote:

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

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.