Download all versions of pact-jvm-consumer-specs2_2.10 JAR files with all dependencies
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.1.4)
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
```
0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.1.4
Last update 28. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.1.4
Last update 28. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.1.3)
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
```
0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.1.3
Last update 27. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.1.3
Last update 27. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.1.2)
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
```
0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.1.2
Last update 26. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.1.2
Last update 26. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.1.1)
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
```
0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.1.1
Last update 09. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.1.1
Last update 09. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.1.0)
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
```
0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.1.0
Last update 08. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.1.0
Last update 08. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.0.9)
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
```
0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.0.9
Last update 06. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.0.9
Last update 06. October 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.0.8)
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
```
0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.0.8
Last update 29. September 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.0.8
Last update 29. September 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.0.7)
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
```
0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.0.7
Last update 24. September 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.0.7
Last update 24. September 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.0.6)
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
```
0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.0.6
Last update 23. September 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.0.6
Last update 23. September 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.0.5)
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
```
0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.0.5
Last update 22. September 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.0.5
Last update 22. September 2014
Tags: body test root consumer willrespondwith must dependency request beequalto import along librarydependencies extends providerconfig here class project matching pact await will rest pactspec example output examplepactspec some this spec consumerservice simple bindings uponreceiving line build author tests json during path specs2 with extend your provider folder unit simpleget library target usage pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!
Page 6 from 3 (items total 68)