Last active
January 21, 2016 11:53
-
-
Save morhekil/a61937fb8011791b6b0c to your computer and use it in GitHub Desktop.
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
def stubs(f) | |
f.post '/v1/oauth2/token?grant_type=client_credentials' do |env| | |
expect(apicalls.shift).to eq env.url.path | |
respond_to_auth_call env | |
end | |
f.post '/v1/transferOut' do |env| | |
expect(apicalls.shift).to eq env.url.path | |
validate_transfer_out_call env | |
respond_to_transfer_out_call env | |
end | |
end | |
before do | |
Faraday.default_adapter = [:test, | |
Faraday::Adapter::Test::Stubs.new { |f| stubs f }] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment