https://github.com/spekframework/spek-spring-extension
https://github.com/spekframework/spek-spring-extension
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/spekframework/spek-spring-extension
- Owner: spekframework
- Created: 2017-01-14T11:43:26.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-10T15:47:21.000Z (over 6 years ago)
- Last Synced: 2025-04-08T12:51:50.942Z (10 months ago)
- Language: Kotlin
- Size: 52.7 KB
- Stars: 12
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Extension for Spek
This is a proof of concept for writing spring integration tests in Spek
## Limitations
- Currently, only injecting beans is supported.
```kotlin
@ContextConfiguration(classes = arrayOf(MyConfiguration::class))
object MySpec: Spek({
val context = createContext(MySpec::class)
val foo = context.inject()
// val foo: Foo by context.inject()
it("blah blah blah") {
foo.doSomething()
}
})
```
## Issues
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).