Created
November 27, 2014 21:19
-
-
Save bethesque/203e9d2ec08f4a40d2df to your computer and use it in GitHub Desktop.
Modifying headers before replaying request using Pact
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
class ProxyApp | |
def initialize real_app | |
@real_app = real_app | |
end | |
def call env | |
@real_app.call(env.merge('HTTP_AUTHORIZATION' => '12345')) | |
end | |
end | |
Pact.service_provider "Some Provider" do | |
app do | |
ProxyApp.new(RealApp) | |
end | |
honours_pact_with "Some Consumer" do | |
#... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment