Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Stubs all the HTTP calls no explicitly registered (is this desired?) #238

Closed
eka opened this Issue Jan 3, 2013 · 2 comments

Comments

Projects
None yet
2 participants

eka commented Jan 3, 2013

I use to group my gems for development and test together, and found out that each time I enter rails console or run a rake task all the HTTP call were stubbed. I thought this was explicitly set.

Is this a desired behavior?

I fixed my problem separating test and development gems group in my Gemfile.

Owner

bblimke commented Jan 3, 2013

Yes, that's by design. Webmock blocks all http connections by default.
This is to prevent tests from making unexpected network connections.

You can use WebMock.disable! or WebMock.allow_net_connect! where needed,
but a good rule is to include webmock only in the test group.

eka commented Jan 3, 2013

Thanks

@eka eka closed this Jan 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment