Skip to content

Commit

Permalink
Remove dependency on Junit and update the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
IainHull committed Jun 19, 2014
1 parent 307dbd1 commit 575d0d8
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 24 deletions.
23 changes: 21 additions & 2 deletions README.md
Expand Up @@ -30,14 +30,33 @@ You can follow the [progress on my blog](http://iainhull.github.io/tags.html#res
* [The Builder as the basis for a DSL](http://iainhull.github.io/2013/07/02/a-simple-rest-dsl-part-2/)
* [Extracting and asserting on response values](http://iainhull.github.io/2013/07/14/a-simple-rest-dsl-part-3/)
* [Grouping common request configuration with the `using` method](http://iainhull.github.io/2013/07/14/a-simple-rest-dsl-part-4/)
* [How to structure DLS projects](http://iainhull.github.io/2014/05/18/a-simple-rest-dsl-part-5/)
* [Improvements to Extractors](http://iainhull.github.io/2014/06/19/a-simple-rest-dsl-part-6/)
* Integrating RestTest with ScalaTest (planned)
* How to document a DLS (planned)
* How to structure DLS projects (planned)
* Summary of Scala techniques and resources for creating DSLs (planned)

## How to build

This project is built with [gradle](http://www.gradle.org/). It includes the gradle wrapper which will download gradle and build the project for you (the only prereq is Java).
This project has been migrated to Scala 2.11 and the build ported to [SBT](http://www.scala-sbt.org/).

To download and build RestTest just:

```
git clone git@github.com:IainHull/resttest.git
cd resttest
sbt test
```

To create a fully configured eclipse project just:

```
sbt eclipse with-source=true
```


### Old build using Gradle ###
This project used to be built with [gradle](http://www.gradle.org/). It still includes the gradle files and the gradle wrapper which will download gradle and build the project for you (the only prereq is Java).

To download and build RestTest just:

Expand Down
5 changes: 1 addition & 4 deletions project/dependencies.scala
Expand Up @@ -4,7 +4,6 @@ object Dependencies {
val jerseyVersion = "1.17.+"
val scalatestVersion = "2.1.6"
val sprayVersion = "1.3.1-20140423"
val junitVersion = "4.+"
val playVersion = "2.3.0-RC2"

val jersey = "com.sun.jersey" % "jersey-core" % jerseyVersion
Expand All @@ -16,7 +15,5 @@ object Dependencies {
val sprayRouting = "io.spray" %% "spray-routing" % sprayVersion
val sprayTestkit = "io.spray" %% "spray-testkit" % sprayVersion

val junit = "junit" % "junit" % junitVersion

val resttestDependencies = Seq(jersey, jerseyClient, scalatest, playJson, sprayCan, sprayRouting, sprayTestkit, junit)
val resttestDependencies = Seq(jersey, jerseyClient, scalatest, playJson, sprayCan, sprayRouting, sprayTestkit)
}
2 changes: 0 additions & 2 deletions src/main/scala/org/iainhull/resttest/TestDriver.scala
Expand Up @@ -17,10 +17,8 @@ package org.iainhull.resttest
* }
* }
*
* @RunWith(classOf[JUnitRunner])
* class PersonUnitSpec extends PersonSpec with SprayUnitTestDriver with MyService
*
* @RunWith(classOf[JUnitRunner])
* class PersonSystemSpec extends PersonSpec with JerseySystemTestDriver {
* override val baseUrl = "http://localhost:9000"
* }
Expand Down
3 changes: 0 additions & 3 deletions src/test/scala/org/iainhull/resttest/ApiSpec.scala
Expand Up @@ -3,10 +3,7 @@ package org.iainhull.resttest
import java.net.URI
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner

@RunWith(classOf[JUnitRunner])
class ApiSpec extends FlatSpec with Matchers {
import Api._
import TestData._
Expand Down
4 changes: 0 additions & 4 deletions src/test/scala/org/iainhull/resttest/DslSpec.scala
@@ -1,15 +1,11 @@
package org.iainhull.resttest

import org.scalatest.Suite
import org.junit.Test
import java.net.URI
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import play.api.libs.json._

@RunWith(classOf[JUnitRunner])
class DslSpec extends FlatSpec with Matchers {
import Dsl._
import TestData._
Expand Down
3 changes: 0 additions & 3 deletions src/test/scala/org/iainhull/resttest/ExtractorsSpec.scala
Expand Up @@ -2,10 +2,7 @@ package org.iainhull.resttest

import org.scalatest.Matchers
import org.scalatest.FlatSpec
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner

@RunWith(classOf[JUnitRunner])
class ExtractorsSpec extends FlatSpec with Matchers {
import Dsl._

Expand Down
3 changes: 0 additions & 3 deletions src/test/scala/org/iainhull/resttest/JsonExtractorsSpec.scala
@@ -1,13 +1,10 @@
package org.iainhull.resttest

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import play.api.libs.json._
import play.api.libs.functional.syntax._

@RunWith(classOf[JUnitRunner])
class JsonExtractorsSpec extends FlatSpec with Matchers {
import Dsl._
import JsonExtractors._
Expand Down
3 changes: 0 additions & 3 deletions src/test/scala/org/iainhull/resttest/RestMatchersSpec.scala
@@ -1,13 +1,10 @@
package org.iainhull.resttest

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.scalatest.matchers.HavePropertyMatcher
import org.scalatest.matchers.HavePropertyMatchResult

@RunWith(classOf[JUnitRunner])
class RestMatcherSpec extends FlatSpec with Matchers {
import language.implicitConversions

Expand Down

0 comments on commit 575d0d8

Please sign in to comment.