-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get a simple example to work? #622
Comments
You have stubbed "http://www.beepbeepbeepboop.com" with foobar response and you make requests to google. |
|
Aha, there we go |
@bblimke Thanks very much. I'm really confused why this was needed, though. This test did not pass due to the stub not raising the exception as expected: before do
stub_request(:post, url)
.with(http_params)
.to_raise(Faraday::ConnectionFailed)
end
it { is_expected.to raise_error(MyCustomError) } But after adding Either way, it's working so I'm happy, but am curious why it needed the explicit call to enable WebMock despite other stubs apparently working fine. Thanks a lot anyway ! |
@bobf I guess you require 'webmock/rspec' which invokes calls Not sure about your single spec as it can be related to your project. If you are able to extract the code to some sample project to reproduce it, then I can have a look. |
Hello,
I'm trying to setup a basic example but seem to be failing to get WebMock to actually stub the GET requests my example is trying to make.
I'm using Mac OS X (
10.11.5
) with a non-system Ruby version of2.1.2
(set byrbenv
).My reduced test case looks like the following:
The text was updated successfully, but these errors were encountered: