} object MyServiceActor extends App with SimpleRoutingApp with MyService { implicit val system = ActorSystem("MyService-System") startServer(interface = "localhost", port = 9090)(myRoute) }
def actorRefFactory = system "My REST service" should { "Reject a POST request" in { Post("/hello") ~> myRoute ~> check { rejection === MethodRejection(HttpMethods.GET) } } } }
def actorRefFactory = system "My REST service" should { "Reject a POST request" in { Post("/hello") ~> sealRoute(myRoute) ~> check { status === MethodNotAllowed } } } }