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

pact-jvm-consumer-specs2_2.10

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.2" ``` or if you are using Gradle: ```groovy dependencies { testCompile "au.com.dius:pact-jvm-consumer-specs2_2.11:3.2.2" } ``` __*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
2.4.18 pact-jvm-consumer-specs2_2.10 2016-12-30 01:41:26 UTC
2.4.17 pact-jvm-consumer-specs2_2.10 2016-10-22 06:55:03 UTC
2.4.16 pact-jvm-consumer-specs2_2.10 2016-10-01 21:31:50 UTC
2.4.15 pact-jvm-consumer-specs2_2.10 2016-08-23 12:49:10 UTC
2.4.14 pact-jvm-consumer-specs2_2.10 2016-08-07 03:34:23 UTC
2.4.13 pact-jvm-consumer-specs2_2.10 2016-07-31 05:03:57 UTC
2.4.12 pact-jvm-consumer-specs2_2.10 2016-07-15 02:52:08 UTC
2.4.11 pact-jvm-consumer-specs2_2.10 2016-07-06 05:09:01 UTC
2.4.10 pact-jvm-consumer-specs2_2.10 2016-06-17 23:10:57 UTC
2.4.9 pact-jvm-consumer-specs2_2.10 2016-05-04 02:35:53 UTC
2.4.8 pact-jvm-consumer-specs2_2.10 2016-03-29 02:18:58 UTC
2.4.7 pact-jvm-consumer-specs2_2.10 2016-03-25 00:43:07 UTC
2.4.6 pact-jvm-consumer-specs2_2.10 2016-02-19 23:23:05 UTC
2.4.5 pact-jvm-consumer-specs2_2.10 2016-02-11 04:33:33 UTC
2.4.4 pact-jvm-consumer-specs2_2.10 2016-01-20 23:42:43 UTC
2.4.3 pact-jvm-consumer-specs2_2.10 2016-01-17 02:54:23 UTC
2.4.2 pact-jvm-consumer-specs2_2.10 2015-12-12 22:04:37 UTC
2.4.1 pact-jvm-consumer-specs2_2.10 2015-11-28 06:32:04 UTC
2.4.0 pact-jvm-consumer-specs2_2.10 2015-11-22 04:03:12 UTC
2.3.3 pact-jvm-consumer-specs2_2.10 2015-11-14 06:34:00 UTC
2.3.2 pact-jvm-consumer-specs2_2.10 2015-10-24 01:11:48 UTC
2.3.1 pact-jvm-consumer-specs2_2.10 2015-10-20 08:56:40 UTC
2.3.0 pact-jvm-consumer-specs2_2.10 2015-10-06 10:17:11 UTC
2.2.15 pact-jvm-consumer-specs2_2.10 2015-09-17 10:07:00 UTC
2.2.14 pact-jvm-consumer-specs2_2.10 2015-09-07 10:07:56 UTC
2.2.13 pact-jvm-consumer-specs2_2.10 2015-08-29 05:21:47 UTC
2.2.12 pact-jvm-consumer-specs2_2.10 2015-08-09 07:15:34 UTC
2.2.11 pact-jvm-consumer-specs2_2.10 2015-08-02 04:45:59 UTC
2.2.10 pact-jvm-consumer-specs2_2.10 2015-07-25 06:09:55 UTC
2.2.9 pact-jvm-consumer-specs2_2.10 2015-07-13 09:11:09 UTC