import org.specs2.mutable._

import play.api.libs.json._
import play.api.test._
import play.api.test.Helpers._


class ApplicationSpec extends Specification {
  "Application" should {

    "send 404 on an invalid route" in new WithApplication {
      route(FakeRequest(GET, "/foo")) must beSome.which (status(_) == NOT_FOUND)
    }

    "have POST routes for" in {
      "request account" in new WithApplication {
        route(
          FakeRequest(POST, "/account/request")
        ) must not (beSome.which (status(_) == NOT_FOUND))
      }

      "new account" in new WithApplication {
        route(
          FakeRequest(POST, "/account/new")
        ) must not (beSome.which (status(_) == NOT_FOUND))
      }

      "location request" in new WithApplication {
        route(
          FakeRequest(POST, "/at")
        ) must not (beSome.which (status(_) == NOT_FOUND))
      }

      "location respond" in new WithApplication {
        route(
          FakeRequest(POST, "/where")
        ) must not (beSome.which (status(_) == NOT_FOUND))
      }
    }
  }
}

import org.specs2.mutable._
import org.specs2.runner._
import org.junit.runner._

import play.api.test._
import play.api.test.Helpers._


@RunWith(classOf[JUnitRunner])
class ApplicationSpec extends Specification {

  "Application" should {

    "send 404 on a bad request" in new WithApplication{
      route(FakeRequest(GET, "/boum")) must beSome.which (status(_) == NOT_FOUND)
    }
  }
}

--- 
+++ 
@@ -1,18 +1,41 @@
 import org.specs2.mutable._
-import org.specs2.runner._
-import org.junit.runner._
 
+import play.api.libs.json._
 import play.api.test._
 import play.api.test.Helpers._
 
 
-@RunWith(classOf[JUnitRunner])
 class ApplicationSpec extends Specification {
-
   "Application" should {
 
-    "send 404 on a bad request" in new WithApplication{
-      route(FakeRequest(GET, "/boum")) must beSome.which (status(_) == NOT_FOUND)
+    "send 404 on an invalid route" in new WithApplication {
+      route(FakeRequest(GET, "/foo")) must beSome.which (status(_) == NOT_FOUND)
+    }
+
+    "have POST routes for" in {
+      "request account" in new WithApplication {
+        route(
+          FakeRequest(POST, "/account/request")
+        ) must not (beSome.which (status(_) == NOT_FOUND))
+      }
+
+      "new account" in new WithApplication {
+        route(
+          FakeRequest(POST, "/account/new")
+        ) must not (beSome.which (status(_) == NOT_FOUND))
+      }
+
+      "location request" in new WithApplication {
+        route(
+          FakeRequest(POST, "/at")
+        ) must not (beSome.which (status(_) == NOT_FOUND))
+      }
+
+      "location respond" in new WithApplication {
+        route(
+          FakeRequest(POST, "/where")
+        ) must not (beSome.which (status(_) == NOT_FOUND))
+      }
     }
   }
 }
Test existence of POST routes
