I am testing a Scalatra servlet that does some important initialization in its init(context: ServletContext)
method.
During tests (with ScalatraSuite) that init
is not executed.
How should I do my important initialization when I am testing?
That Scalatra testing page (section "Testing FAQ") does not reveal that.
Extra Info:
The "Testing FAQ" section states
scalatra-test is built on Jetty's [ServletTester][3]
but I also could not extract any information from the internet on how to run the init if I were coding in java.