You can clone with
HTTPS or Subversion.
It appears that stub_request.to_return(:body => ...) doesn't call callbacks set via Excon's :response_block, making me unable to test an application that uses them. Here's an example:
stub_request.to_return(:body => ...)
The 'irb test' at the bottom shows that MyApp.doit should simply return the body of the webpage. However the spec fails:
% rspec ./app_spec.rb
1) app works
Failure/Error: a.doit.should eq mystr
(compared using ==)
# ./app_spec.rb:12:in `block (2 levels) in <top (required)>'
Finished in 0.00343 seconds
It gets an empty string.
If I add a puts "here" before line 11 in app.rb, it never gets printed - making me think the :response_block is never called.
Can you please confirm / spec / fix?
Thank you for reporting that. It's fixed in WebMock 1.9.2.