Skip to content
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

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

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

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

eka opened this issue Jan 3, 2013 · 2 comments

Comments

@eka
Copy link

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.

@bblimke
Copy link
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
Copy link
Author

eka commented Jan 3, 2013

Thanks

@eka eka closed this as completed Jan 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants