thoughtworks/pacto — pull request #32 by maxlinc (2013-09-26 00:48:58+00:00)
Title: Pacto hooks

We want Pacto response generation hooked into WebMock. We believe a middleware system might make sense, so we can make response validation the final middleware, but can also include middleware in the chain for templating or fixing HTTP headers (e.g. fixing Length after processing a template).

Proposed format:

```ruby
Pacto.configure do |c|
c.strict_matchers = false
c.set_callback do | contracts, req, res |
# Do something with contracts / interaction
end
end
```

Also, provide default callbacks for templating and validation.