Skip to content

pact-foundation/pact-ruby-standalone-e2e-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pact standalone e2e example

Build Status

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.

Usage

Fork and clone the codebase

# Fork the repository using the 'Fork' button on the repository home page, then:
git clone git@github.com:YOUR_USERNAME/pact-ruby-standalone-e2e-example.git
cd pact-ruby-standalone-e2e-example

Install the relevant version of the pact standalone package

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.

Set up the consumer expectations

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).

"Implement" the provider

Modify the script/provider-config.ru to match your provider's behaviour

Run the example

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

Reporting an issue

  • 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.

About

Code base to use for demonstrating features and recreating issues in the Ruby standalone implementation of pact. Please fork it and modify to recreate your own code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published