Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Expose relevant specs to external adapters
- Loading branch information
1 parent
6ff61c0
commit 14b596f
Showing
4 changed files
with
31 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'webmock/rspec' | ||
WebMock.disable_net_connect!(allow_localhost: true) | ||
|
||
require_relative '../support/helper_methods' | ||
require_relative '../support/disabling_stub' | ||
require_relative '../support/streaming_response_checker' | ||
require_relative '../support/shared_examples/adapter' | ||
require_relative '../support/shared_examples/request_method' | ||
|
||
RSpec.configure do |config| | ||
config.include Faraday::HelperMethods | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
# Allows to disable WebMock stubs | ||
module DisablingStub | ||
def disable | ||
@disabled = true | ||
end | ||
|
||
def disabled? | ||
@disabled | ||
end | ||
|
||
WebMock::RequestStub.prepend self | ||
end |