Skip to content

Instantly share code, notes, and snippets.

@justincampbell
Created July 23, 2014 21:14
Show Gist options
  • Save justincampbell/5a4e7424e6434cdb0808 to your computer and use it in GitHub Desktop.
Save justincampbell/5a4e7424e6434cdb0808 to your computer and use it in GitHub Desktop.
import org.specs._
import dispatch.classic.Http
import dispatch.classic.Request
import dispatch.StatusCode
object AppSpec extends Specification with unfiltered.spec.jetty.Served {
def setup = _.filter(new App)
val http = new Http
"GET /" should {
"redirect to the documentation" in {
val status = http.x(host) { case (code, _, _) => code }
// status must be equalTo(302)
}
}
def teardown = {
http.shutdown
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment