On Wed, May 9, 2012 at 4:43 AM, Ray <ticktricktr...@gmail.com> wrote:
> I have had no luck at all to get any useful behaviour out of WebMock.
> Here is what I have in my Specs.
It runs fine in IRB, but not in RAILS_ENV=test rails console.
I'm guessing it's either a conflict with another gem or possibly a
load order issue.
I created a blank rails project and I'm trying to home in on the error
source.
On May 9, 4:15 pm, Pete Higgins <p...@peterhiggins.org> wrote:
> On Wed, May 9, 2012 at 4:43 AM, Ray <ticktricktr...@gmail.com> wrote:
> > I have had no luck at all to get any useful behaviour out of WebMock.
> > Here is what I have in my Specs.
> On Wed, May 9, 2012 at 4:43 AM, Ray <ticktricktr...@gmail.com> wrote:
> > I have had no luck at all to get any useful behaviour out of WebMock.
> > Here is what I have in my Specs.
Removing pry from the gem file makes it work in the Rails console,
sadly in the specs it still gives me a nil.
For now, I can't spare any more time to dwell on this.
I will come back to this issue later this month because I really want
to test against that. Maybe a better way to start would be to make the
WebMock specs fail, rather than trying to make mine pass.
On May 9, 5:35 pm, Ray <ticktricktr...@gmail.com> wrote:
> I have figured the culprit, but I don't have a solution yet.
> Try running that again and using pry instead of irb.
> On May 9, 4:15 pm, Pete Higgins <p...@peterhiggins.org> wrote:
> > On Wed, May 9, 2012 at 4:43 AM, Ray <ticktricktr...@gmail.com> wrote:
> > > I have had no luck at all to get any useful behaviour out of WebMock.
> > > Here is what I have in my Specs.
So it seems to be working,
stub_request(:any, "www.example.com").to_return(:status => [500,
"Internal Server Error"])
response = HTTParty.get( "http://www.example.com/" )
response returns nil when you ask it
response
=> nil
However, response.response is still there, it's just a matter of
output, the underlying stuff is still working. Man, not one of my most
productive days. I will put some more time into this when I can, at
least I can use WebMock, so for now I'm happy.
Ray
On May 9, 6:25 pm, Ray <ticktricktr...@gmail.com> wrote:
> Removing pry from the gem file makes it work in the Rails console,
> sadly in the specs it still gives me a nil.
> For now, I can't spare any more time to dwell on this.
> I will come back to this issue later this month because I really want
> to test against that. Maybe a better way to start would be to make the
> WebMock specs fail, rather than trying to make mine pass.
> On May 9, 5:35 pm, Ray <ticktricktr...@gmail.com> wrote:
> > I have figured the culprit, but I don't have a solution yet.
> > Try running that again and using pry instead of irb.
> > On May 9, 4:15 pm, Pete Higgins <p...@peterhiggins.org> wrote:
> > > On Wed, May 9, 2012 at 4:43 AM, Ray <ticktricktr...@gmail.com> wrote:
> > > > I have had no luck at all to get any useful behaviour out of WebMock.
> > > > Here is what I have in my Specs.