Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
adding webmock gem without require disables http #205
I'd like to have some tests that do a real http request, and some that stub/mock http. I have several working rspec tests using http without webmock. If I add the webmock gem, even without require 'webmock/rspec', all the tests fail. Adding WebMock.allow_net_connect! fixes it, of course.
This seems non-intuitive. I'd think allow_net_connect would be the default, and would only be disabled if you require 'webmock/rspec' or add a line Webmock.disable_net_connect! Seems a little inconvenient, not a huge issue.
webmock version 1.8.9
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
That's correct, WebMock when required disabled all connections by default, and this is by design.
I suggest you either use