-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to reuse the algolia webmocks (#236)
* Allow to reuse the algolia webmocks This is needed because when you require algolia/webmock, the mocks will work only in one spec at rspec, if you required webmock/rspec. This happens because webmock/rspec will clear all stubs between examples and we need to stub again for the next one. The new approach is: require 'algolia/webmock' RSpec.configure do |config| config.before(:each) { Algolia::WebMock.mock! } end * Mock the requests when requiring the webmock This will make this change in a incremental way, the old behavior will be kept and for those who wants to reuse can still call the method manually.
- Loading branch information
Showing
3 changed files
with
50 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters