This is a proof of concept for writing spring integration tests in Spek
- Currently, only injecting beans is supported.
@ContextConfiguration(classes = arrayOf(MyConfiguration::class)) object MySpec: Spek({ val context = createContext(MySpec::class) val foo = context.inject<Foo>() // val foo: Foo by context.inject() it("blah blah blah") { foo.doSomething() } })
Spring's TestContext
framework makes assumptions on how tests are structured which is
incompatible with Spek, which means we can't use TestContextManager
(we can but it will be very hackish).