flapjack/flapjack-diner — pull request #35 by ali-graham (2014-09-26 05:24:48+00:00)
Title: Pact specs

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