Support shared configurations
Closed this issue · 0 comments
raniejade commented
Specs can be configured by overriding configure
:
class SomeSpec: KSpec() {
override fun configure(config: KSpecConfig) {
...
}
...
}
Configuration can be shared via inheritance however it's not that flexible. Allow specifying configurations via an annotation (@Configurations
) which can contains an array of Configuration
classes, e.g:
Configuration
class SharedConfiguration: Configuration {
override fun apply(config: KSpecConfig) {
...
}
}
Spec
@Configurations(SharedConfiguration::class)
class SomeSpec: KSpec() {
...
}
Configurations are applied in the order they are listed.