Download specs2_2.10.0-RC5 JAR file with all dependencies
doobie-contrib-specs2_2.11 from group org.tpolecat (version 0.3.0-M1)
Specs2 support for doobie.
specs2_2.9.1-1 from group org.specs2 (version 1.12.4)
specs2
accord-specs2_2.10 from group com.wix (version 0.5)
Specs² matchers for the Accord validation library
scalatra-specs2_2.8.2 from group org.scalatra (version 2.1.0.M1)
Specs2 support for the Scalatra test framework
pact-jvm-provider-specs2_2.11 from group au.com.dius (version 3.3.0-beta.0)
pact-jvm-provider-specs2
========================
Provides an extension to Specs2 Specification to validate a pact file against a running provider. See
[ExampleProviderSpec.scala](pact-jvm-provider-specs2/src/test/scala/au/com/dius/pact/provider/specs2/ExampleProviderSpec.scala)
for an example.
*Note:* The Pact ProviderSpec requires spec2 3.x
0 downloads
scalatra-specs2_2.11 from group com.meedoc (version 2.4.1)
Specs2 support for the Scalatra test framework
scalatra-specs2_2.10 from group org.scalatra (version 2.4.1)
Specs2 support for the Scalatra test framework
specs2_2.10 from group org.specs2 (version 3.3.1)
specs2
scalatra-specs2_2.11 from group org.scalatra (version 2.4.1)
Specs2 support for the Scalatra test framework
scalatra-specs2_2.9.2 from group org.scalatra (version 2.2.2)
Specs2 support for the Scalatra test framework
scalatra-specs2_2.9.3 from group org.scalatra (version 2.2.2)
Specs2 support for the Scalatra test framework
unfiltered-specs2_2.10 from group net.databinder (version 0.9.0-beta1)
Facilitates testing Unfiltered servers with Specs2
scalatra-specs2_2.8.1 from group org.scalatra (version 2.1.0.M1)
Specs2 support for the Scalatra test framework
pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.4.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
```
0 downloads
doobie-contrib-specs2_2.12.0-M3 from group org.tpolecat (version 0.3.0)
Specs2 support for doobie.
0 downloads
Page 2 from 5 (items total 73)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy