{"action":"created","issue":{"url":"https://api.github.com/repos/realestate-com-au/pact/issues/83","labels_url":"https://api.github.com/repos/realestate-com-au/pact/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/realestate-com-au/pact/issues/83/comments","events_url":"https://api.github.com/repos/realestate-com-au/pact/issues/83/events","html_url":"https://github.com/realestate-com-au/pact/issues/83","id":92886619,"number":83,"title":"Chat about Ember/Rails","user":{"login":"samselikoff","id":2922250,"avatar_url":"https://avatars.githubusercontent.com/u/2922250?v=3","gravatar_id":"","url":"https://api.github.com/users/samselikoff","html_url":"https://github.com/samselikoff","followers_url":"https://api.github.com/users/samselikoff/followers","following_url":"https://api.github.com/users/samselikoff/following{/other_user}","gists_url":"https://api.github.com/users/samselikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/samselikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samselikoff/subscriptions","organizations_url":"https://api.github.com/users/samselikoff/orgs","repos_url":"https://api.github.com/users/samselikoff/repos","events_url":"https://api.github.com/users/samselikoff/events{/privacy}","received_events_url":"https://api.github.com/users/samselikoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-03T14:30:51Z","updated_at":"2015-07-06T03:28:42Z","closed_at":null,"body":"Hi, I didn't know the best way to reach you so I figured I'd open an issue.\r\n\r\nI'm the author of an HTTP mocking library for Ember.js called [Mirage](https://github.com/samselikoff/ember-cli-mirage/). Mirage aims to make it as simple as possible to mock out your backend so you can develop your entire frontend against a mock server.\r\n\r\nAs I've used this technique more and more, I've been thinking about ways to verify that the mock server's contract is actually fulfilled by the real server, so the tests aren't returning false positives. Someone pointed me to Pact, and after reading Ian Robinson's article & some of the Pact documentation, the concept of consumer-driven contracts seems like a really good solution to many of the problems I've been facing.\r\n\r\nI'd love to chat about a few things to see if I can work out using Mirage to generate a contract that fulfills the Pact spec. Also, many in the Ember community use Rails as a backend, but I'm having a hard time finding much info on how to use Pact with Rails. It seems the contract verification tests you end up writing on the provider side with Pact look extremely similar to typical Rails request specs. I wonder if there's an opportunity for a library to consolidate these things.\r\n\r\nI'm also curious about Pact's consumer library that generates a client server. The reason I made Mirage is because writing out the mocks by hand like these in each test  seemed cumbersome and unmaintainable. (Many in the Ember.js community use Pretender.js for this). I would be very interested to see what the Pact mock server test definitions look like for a full application.\r\n\r\nAnyway, I'm still getting my feet wet and would love to chat about this, perhaps on a Hangout, or here or email. My email is sam.selikoff[at]gmail.com. Thanks for all your amazing work + documentation on this lib, I've learned so much already!"},"comment":{"url":"https://api.github.com/repos/realestate-com-au/pact/issues/comments/118703849","html_url":"https://github.com/realestate-com-au/pact/issues/83#issuecomment-118703849","issue_url":"https://api.github.com/repos/realestate-com-au/pact/issues/83","id":118703849,"user":{"login":"bethesque","id":446228,"avatar_url":"https://avatars.githubusercontent.com/u/446228?v=3","gravatar_id":"","url":"https://api.github.com/users/bethesque","html_url":"https://github.com/bethesque","followers_url":"https://api.github.com/users/bethesque/followers","following_url":"https://api.github.com/users/bethesque/following{/other_user}","gists_url":"https://api.github.com/users/bethesque/gists{/gist_id}","starred_url":"https://api.github.com/users/bethesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bethesque/subscriptions","organizations_url":"https://api.github.com/users/bethesque/orgs","repos_url":"https://api.github.com/users/bethesque/repos","events_url":"https://api.github.com/users/bethesque/events{/privacy}","received_events_url":"https://api.github.com/users/bethesque/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T03:28:41Z","updated_at":"2015-07-06T03:28:41Z","body":"Hi Sam,\r\n\r\nAm very interested to talk, I've occasionally thought about providing an HTTP stubbing option as well as the service, but there are always been too many other things that were a higher priority.\r\n\r\nIn answer to your question about verifying a pact with Rails, as Ron said, it uses Rack Test. You can configure the app in the `Pact.service_provider` block.\r\n\r\n```ruby\r\nPact.service_provider \"My Service Provider\" do\r\n  app { MyRailsApp }\r\n  honours_pact_with ...\r\nend\r\n```\r\n\r\nThe `pact:verify` task should work as normal. \r\n\r\nGiven that you have questions that potentially relate to pact development, maybe you could post these questions to the pact-dev google group for discussion https://groups.google.com/forum/#!forum/pact-dev and we can talk about them there.\r\n\r\nCheers,\r\nBeth"}}