BaseScalatraSpec

org.scalatra.test.specs2.BaseScalatraSpec
trait BaseScalatraSpec extends BeforeAfterAll, ScalatraTests

A base specification structure that starts the tester before the specification and stops it afterward. Clients probably want to extend ScalatraSpec or MutableScalatraSpec.

Attributes

Graph
Supertypes
trait ScalatraTests
trait HttpComponentsClient
trait Client
trait ImplicitConversions
trait EmbeddedJettyContainer
trait JettyContainer
trait Container
trait BeforeAfterAll
trait FragmentsFactory
trait SpecificationStructure
trait ContextualSpecificationStructure
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Concrete methods

def afterAll(): Unit
def beforeAll(): Unit

Inherited methods

def addFilter(filter: Class[_ <: Filter], path: String, dispatches: EnumSet[DispatcherType]): FilterHolder

Attributes

Inherited from:
JettyContainer
def addFilter(filter: Class[_ <: Filter], path: String): FilterHolder

Attributes

Inherited from:
JettyContainer
def addFilter(filter: Filter, path: String, dispatches: EnumSet[DispatcherType]): FilterHolder

Attributes

Inherited from:
JettyContainer
def addServlet(servlet: Class[_ <: HttpServlet], path: String): ServletHolder

Attributes

Inherited from:
JettyContainer
def addServlet(servlet: HttpServlet, path: String, name: String): Unit

Attributes

Inherited from:
JettyContainer
def addServlet(servlet: HttpServlet, path: String): Unit

Attributes

Inherited from:
JettyContainer
def baseUrl: String

Attributes

Inherited from:
EmbeddedJettyContainer
def body: String

Attributes

Inherited from:
Client
def bodyBytes: Array[Byte]

Attributes

Inherited from:
Client
def connect[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def contextPath: String

Attributes

Inherited from:
EmbeddedJettyContainer
def createBody(name: String, content: Any): UploadableBody

Attributes

Inherited from:
HttpComponentsClient
protected def createClient: CloseableHttpClient

Attributes

Inherited from:
HttpComponentsClient
def decorate(is: SpecStructure, env: Env): SpecStructure

Attributes

Inherited from:
SpecificationStructure
def delete[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
protected def fragmentFactory: FragmentFactory

Attributes

Inherited from:
FragmentsFactory
def fragments: Env => Fragments

Attributes

Inherited from:
ContextualSpecificationStructure
def get[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def get[A](uri: String, params: (String, String)*)(f: => A): A

Attributes

Inherited from:
Client
def head[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def head[A](uri: String, params: (String, String)*)(f: => A): A

Attributes

Inherited from:
Client
def header: header.type

Attributes

Inherited from:
Client
def is: SpecStructure

Attributes

Inherited from:
SpecificationStructure
def localPort: Option[Int]

The port of the currently running Jetty. May differ from port if port is 0.

The port of the currently running Jetty. May differ from port if port is 0.

Attributes

Returns

Some port if Jetty is currently listening, or None if it is not.

Inherited from:
EmbeddedJettyContainer
override def map(fs: => Fragments): Fragments

modify the fragments

modify the fragments

Attributes

Definition Classes
BeforeAfterAll -> SpecificationStructure
Inherited from:
BeforeAfterAll
def map(fs: => Fragments, env: Env): Fragments

modify the fragments, using the current environment

modify the fragments, using the current environment

Attributes

Inherited from:
SpecificationStructure
def map(structure: SpecStructure): SpecStructure

modify the specification structure

modify the specification structure

Attributes

Inherited from:
SpecificationStructure
def mount(app: Filter, path: String, dispatches: EnumSet[DispatcherType]): FilterHolder

Attributes

Inherited from:
JettyContainer
def mount(servlet: HttpServlet, path: String, name: String): Unit

Attributes

Inherited from:
JettyContainer
def mount(servlet: HttpServlet, path: String): Unit

Attributes

Inherited from:
JettyContainer
def mount(klass: Class[_], path: String): Holder[_ >: Servlet & Filter <: Servlet | Filter]

Attributes

Inherited from:
JettyContainer
def options[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def patch[A](uri: String, body: Array[Byte], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def patch[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def patch[A](uri: String, params: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def patch[A](uri: String, params: (String, String)*)(f: => A): A

Attributes

Inherited from:
Client
def port: Int

Sets the port to listen on. 0 means listen on any available port.

Sets the port to listen on. 0 means listen on any available port.

Attributes

Inherited from:
EmbeddedJettyContainer
def post[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def post[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)])(f: => A): A

Attributes

Inherited from:
Client
def post[A](uri: String, body: Array[Byte], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def post[A](uri: String, params: Iterable[(String, String)], headers: Map[String, String])(f: => A): A

Attributes

Inherited from:
Client
def post[A](uri: String, params: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def post[A](uri: String, params: (String, String)*)(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)])(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, body: Array[Byte], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)], headers: Map[String, String])(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
def put[A](uri: String, params: (String, String)*)(f: => A): A

Attributes

Inherited from:
Client
def response: ClientResponse

Returns the current response within the scope of the submit method.

Returns the current response within the scope of the submit method.

Attributes

Inherited from:
Client
def session[A](f: => A): A

Attributes

Inherited from:
HttpComponentsClient
def skipDefaultServlet: Boolean

Attributes

Inherited from:
JettyContainer
def start(): Unit

Attributes

Inherited from:
EmbeddedJettyContainer
def status: Int

Attributes

Inherited from:
Client
def stop(): Unit

Attributes

Inherited from:
EmbeddedJettyContainer
def structure: Env => SpecStructure

Attributes

Inherited from:
SpecificationStructure
def submit[A](method: String, path: String, queryParams: Iterable[(String, String)], headers: Iterable[(String, String)], body: Array[Byte])(f: => A): A

Attributes

Inherited from:
HttpComponentsClient
protected def submitMultipart[A](method: String, path: String, params: Iterable[(String, String)], headers: Iterable[(String, String)], files: Iterable[(String, Any)])(f: => A): A

Attributes

Inherited from:
HttpComponentsClient
def trace[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A

Attributes

Inherited from:
Client
protected def withResponse[A](res: ClientResponse)(f: => A): A

Attributes

Inherited from:
Client

Inherited fields

protected val httpComponentsRequestConfig: RequestConfig

Can be overridden RequestConfig

Can be overridden RequestConfig

Attributes

Inherited from:
HttpComponentsClient
var resourceBasePath: String

Attributes

Inherited from:
Container
lazy val server: Server

Attributes

Inherited from:
EmbeddedJettyContainer
lazy val servletContextHandler: ServletContextHandler

Attributes

Inherited from:
EmbeddedJettyContainer

Implicits

Inherited implicits

implicit def stringToByteArray(str: String): Array[Byte]

Attributes

Inherited from:
ImplicitConversions