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.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
3.3.5 pact-jvm-consumer-specs2_2.11 2017-01-14 06:48:57 UTC
3.3.4 pact-jvm-consumer-specs2_2.11 2017-01-04 05:02:45 UTC
2.4.18 pact-jvm-consumer-specs2_2.11 2016-12-30 01:42:10 UTC
3.3.3 pact-jvm-consumer-specs2_2.11 2016-11-06 03:45:18 UTC
2.5.0-beta.0 pact-jvm-consumer-specs2_2.11 2016-10-22 12:53:33 UTC
3.3.2 pact-jvm-consumer-specs2_2.11 2016-10-22 08:55:56 UTC
2.4.17 pact-jvm-consumer-specs2_2.11 2016-10-22 06:55:41 UTC
3.3.1 pact-jvm-consumer-specs2_2.11 2016-10-02 03:47:54 UTC
2.4.16 pact-jvm-consumer-specs2_2.11 2016-10-01 21:32:29 UTC
3.5.0-beta.2 pact-jvm-consumer-specs2_2.11 2016-09-21 12:35:10 UTC
3.3.0 pact-jvm-consumer-specs2_2.11 2016-09-07 10:49:36 UTC
3.5.0-beta.1 pact-jvm-consumer-specs2_2.11 2016-08-28 11:16:28 UTC
2.4.15 pact-jvm-consumer-specs2_2.11 2016-08-23 12:49:46 UTC
3.2.13 pact-jvm-consumer-specs2_2.11 2016-08-14 01:50:12 UTC
3.2.12 pact-jvm-consumer-specs2_2.11 2016-08-07 04:36:46 UTC