Re: [rspec-users] Mocking a 3rd party call, but with a few exceptions

2008-09-16 Thread Christopher Bailey
I've played around a bit on this. The constant setting with the service locator pattern looked good, but I couldn't get the undoing/resetting of the constant to work properly, not sure what I was doing wrong there. This appears to be a solution though: In my spec_helper.rb (which is required by al

Re: [rspec-users] Mocking a 3rd party call, but with a few exceptions

2008-09-05 Thread Pat Maddox
On Fri, Sep 5, 2008 at 2:15 PM, Christopher Bailey <[EMAIL PROTECTED]> wrote: > I use geocoding in our app, and it permeates most of the core functionality. > Because it makes a call out to Google or Yahoo or what not to do the > geocoding, I'd like to mock this for the bulk of my tests, except fo

[rspec-users] Mocking a 3rd party call, but with a few exceptions

2008-09-05 Thread Christopher Bailey
I use geocoding in our app, and it permeates most of the core functionality. Because it makes a call out to Google or Yahoo or what not to do the geocoding, I'd like to mock this for the bulk of my tests, except for the few tests that actually do stuff where they need the real data. I had started