NoMethodError: undefined method `stub_request'

1,969 views
Skip to first unread message

Alex Chaffee

unread,
Nov 29, 2011, 6:54:19 PM11/29/11
to oauth...@googlegroups.com
Looks like WebMock isn't working right inside oauth-ruby. Is anyone else able to run the tests after a clean checkout and bundle install? I get 7 of these:

  1) Error:
test_token_request_follows_redirect(ConsumerTest):
NoMethodError: undefined method `stub_request' for #<ConsumerTest:0x007f8e91b48878>

There's a Gemfile.lock so I assume this should all be kosher.

...Aha! I fixed it with a "bundle update". There must have been a bug in webmock v.1.3.5 which is the one that was locked.

(This is why I never check in "Gemfile.lock" for library gems, just for deployed apps.)

 - A

Alex Chaffee

unread,
Nov 30, 2011, 7:38:19 PM11/30/11
to oauth...@googlegroups.com
I was trying to run the tests for oauth-ruby and receiving the error "NoMethodError: undefined method `stub_request'" in about 7 places. Turns out the version of webmock in Gemfile.lock was pretty out of date, possibly a Ruby 1.9.2 incompatibility...

Quick fix: "bundle update"

I pushed it to my fork
and all is well.

 - A

P.S. I thought I sent this already, but it doesn't seem to be on the list. Maybe I'm stuck in a moderation queue? Apologies if it shows up twice.

Reply all
Reply to author
Forward
0 new messages