flapjack / flapjack-diner

Consumer of the Flapjack API
http://flapjack.io/
MIT License
17 stars 10 forks source link

Pact specs #35

Closed ghost closed 10 years ago

ghost commented 10 years ago

Splits up the various resources into different subfiles, and changes the specs to use https://github.com/realestate-com-au/pact , which means the consumer specs can be checked on the provider side.

Some of pact's setting of expectations is a little primitive, so there's some shared data knowledge on both sides, which means there's danger of "fixture creep". Hopefully that story will improve, but having this in place is better than not.

The specs, for the most part, check for success and one error state (missing record/s); in the future we should test invalid data that is accepted by diner but rejected on the server side.

I've kept Webmock around for the tests which need web functionality stubbed rather than checked locally (e.g. logging, network problems, etc.)

jessereynolds commented 10 years ago

Wow, cool.

I've added a commit that removes tags from contacts in the specs and therefore the generated pact.