Code base to use for demonstrating features or recreating issues in the Ruby standalone implementation of Pact. Please fork it and modify to demonstrate or recreate your own code.
This code base is not intended as an example of a best practice Pact implementation. Its purpose is to create a running example with the simplest code possible.
# Fork the repository using the 'Fork' button on the repository home page, then:
git clone [email protected]:YOUR_USERNAME/pact-ruby-standalone-e2e-example.git
cd pact-ruby-standalone-e2e-example
Set the VERSION
in the script/install.sh
to the version you are using and run script/install.sh
(assumes you are on OSX or Linux). This will install the pact executable in ./pact
.
Modify the script/consumer-interaction.json
file to create your interaction. Note that you will have to hand code any matchers you want to use, using either the original Ruby syntax or the v2+ matching rules (see the pact-specification for more information).
Modify the script/provider-config.ru
to match your provider's behaviour
Execute script/run.sh
You can run just the consumer side or provider side of the process by calling script/consumer-create-pact.sh
or script/provider-verify-pact.sh
-
Commit your code on a branch (so you can easily reuse the repository for other issues) and push it to your fork
git checkout -b "issue/my-issue" git add . git commit -m "chore: modify code to recreate my issue" git push --set-upstream origin issue/my-issue
-
Open an issue in the appropriate codebase (see pact-foundation for most of the repositories) and include a link to your branch.