-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(monkeypatch): allow a ruby file to be loaded in order to perform…
… at monkeypatch
- Loading branch information
Showing
6 changed files
with
39 additions
and
0 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
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,24 @@ | ||
describe "pact-provider-verifier with monkeypatch" do | ||
before(:all) do | ||
@pipe = IO.popen({}, %w{bundle exec rackup -p 4870 spec/support/config.ru}) | ||
sleep 2 | ||
end | ||
|
||
subject { `bundle exec bin/pact-provider-verifier ./test/me-they.json --monkeypatch #{Dir.pwd}/spec/support/monkeypatch.rb --monkeypatch #{Dir.pwd}/spec/support/another_monkeypatch.rb -a 1.0.100 --provider-base-url http://localhost:4870 --provider_states_setup_url http://localhost:4870/provider-state 2>&1` } | ||
|
||
it "exits with a 0 exit code" do | ||
subject | ||
puts subject | ||
expect($?).to eq 0 | ||
end | ||
|
||
it "loads the monkeypatch file" do | ||
expect(subject).to include "THIS IS A MONKEYPATCHING FILE!!!" | ||
expect(subject).to include "THIS IS ANOTHER MONKEYPATCHING FILE!!!" | ||
end | ||
|
||
|
||
after(:all) do | ||
Process.kill 'KILL', @pipe.pid | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
puts "THIS IS ANOTHER MONKEYPATCHING FILE!!!" |
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 @@ | ||
puts "THIS IS A MONKEYPATCHING FILE!!!" |