Versions of artifact au.com.dius:pact-jvm-consumer-specs2_2.11

pact-jvm-consumer-specs2_2.11

pact-jvm-consumer-specs2 ======================== ## Specs2 Bindings for the pact-jvm library ## Dependency In the root folder of your project in build.sbt add the line: ```scala libraryDependencies += "au.com.dius" %% "pact-jvm-consumer-specs2" % "3.2.11" ``` or if you are using Gradle: ```groovy dependencies { testCompile "au.com.dius:pact-jvm-consumer-specs2_2.11:3.2.11" } ``` __*Note:*__ `PactSpec` requires spec2 3.x. Also, for spray users there's an incompatibility between specs2 v3.x and spray. Follow these instructions to resolve that problem: https://groups.google.com/forum/#!msg/spray-user/2T6SBp4OJeI/AJlnJuAKPRsJ ## Usage To author a test, mix `PactSpec` into your spec First we define a service client called `ConsumerService`. In our example this is a simple wrapper for `dispatch`, an HTTP client. The source code can be found in the test folder alongside the `ExamplePactSpec`. Here is a simple example: ``` import au.com.dius.pact.consumer.PactSpec class ExamplePactSpec extends Specification with PactSpec { val consumer = "My Consumer" val provider = "My Provider" override def is = uponReceiving("a request for foo") .matching(path = "/foo") .willRespondWith(body = "{}") .withConsumerTest { providerConfig => Await.result(ConsumerService(providerConfig.url).simpleGet("/foo"), Duration(1000, MILLISECONDS)) must beEqualTo(200, Some("{}")) } } ``` This spec will be run along with the rest of your specs2 unit tests and will output your pact json to ``` /target/pacts/<Consumer>_<Provider>.json ```

Artifact Version Name Latest uploaded at
3.5.7-jre7.0 pact-jvm-consumer-specs2_2.11 2017-10-03 05:48:13 UTC
3.5.7 pact-jvm-consumer-specs2_2.11 2017-10-03 00:45:55 UTC
3.5.6-jre7.0 pact-jvm-consumer-specs2_2.11 2017-09-28 05:11:33 UTC
3.5.6 pact-jvm-consumer-specs2_2.11 2017-09-27 01:53:40 UTC
3.5.5-jre7.0 pact-jvm-consumer-specs2_2.11 2017-09-14 02:33:54 UTC
3.5.5 pact-jvm-consumer-specs2_2.11 2017-09-11 23:09:27 UTC
3.5.4-jre7.0 pact-jvm-consumer-specs2_2.11 2017-08-19 07:54:33 UTC
3.5.4 pact-jvm-consumer-specs2_2.11 2017-08-18 05:34:07 UTC
2.4.19 pact-jvm-consumer-specs2_2.11 2017-08-16 23:57:00 UTC
3.5.3-jre7.0 pact-jvm-consumer-specs2_2.11 2017-08-10 00:27:17 UTC
3.5.3 pact-jvm-consumer-specs2_2.11 2017-08-06 07:54:14 UTC
3.5.2 pact-jvm-consumer-specs2_2.11 2017-07-12 01:09:09 UTC
3.5.2-jre7.0 pact-jvm-consumer-specs2_2.11 2017-07-12 00:34:59 UTC
3.5.1 pact-jvm-consumer-specs2_2.11 2017-07-09 08:14:47 UTC
3.5.1-jre7.1 pact-jvm-consumer-specs2_2.11 2017-07-09 06:53:35 UTC
3.5.0-jre7.1 pact-jvm-consumer-specs2_2.11 2017-06-24 13:14:05 UTC
3.5.0-jre7 pact-jvm-consumer-specs2_2.11 2017-06-24 11:24:10 UTC
3.5.0 pact-jvm-consumer-specs2_2.11 2017-06-24 08:08:59 UTC
3.5.0-rc.3 pact-jvm-consumer-specs2_2.11 2017-06-20 23:38:44 UTC
3.5.0-rc.2 pact-jvm-consumer-specs2_2.11 2017-06-11 07:10:39 UTC
3.4.1 pact-jvm-consumer-specs2_2.11 2017-06-11 02:00:39 UTC
3.5.0-rc.1 pact-jvm-consumer-specs2_2.11 2017-05-25 03:40:23 UTC
3.4.0 pact-jvm-consumer-specs2_2.11 2017-05-18 05:36:09 UTC
3.3.10 pact-jvm-consumer-specs2_2.11 2017-05-18 04:00:04 UTC
3.5.0-beta.4 pact-jvm-consumer-specs2_2.11 2017-05-14 11:47:09 UTC
3.3.9 pact-jvm-consumer-specs2_2.11 2017-05-08 11:28:40 UTC
3.3.8 pact-jvm-consumer-specs2_2.11 2017-04-14 03:52:48 UTC
3.3.7 pact-jvm-consumer-specs2_2.11 2017-03-27 04:34:32 UTC
3.5.0-beta.3 pact-jvm-consumer-specs2_2.11 2017-02-05 05:55:44 UTC
3.3.6 pact-jvm-consumer-specs2_2.11 2017-01-26 06:37:49 UTC