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

Mock the requests to Rollbar API #450

Merged
merged 1 commit into from
Apr 27, 2016
Merged

Mock the requests to Rollbar API #450

merged 1 commit into from
Apr 27, 2016

Conversation

jondeandres
Copy link
Contributor

@jondeandres jondeandres commented Apr 27, 2016

Working and developing in the gem using real requests to the API becomes a nightmare when there are some connection issues. The tests fails in Travis and we loose a lot of time rebuilding the failed jobs.

With this change we mock all the requests to a mocked Rollbar API. Since for now the tests only expect to receive 200 codes, the mock API just return 200 codes with the expected response body. This can be changed in the future easier.

The time to run the tests now is between 1.5s and 2s. Not the build in travis that needs to run bundle install, etc...

For Ruby 1.8.7 and Ruby 1.9.2 we cannot install webmock. This is a nother smell that we should start thinking in stop official support for those Rubies at some point.

@jondeandres jondeandres merged commit 0ee400b into master Apr 27, 2016
@jondeandres jondeandres deleted the webmock branch April 27, 2016 12:02
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

Successfully merging this pull request may close these issues.

1 participant