https://github.com/arturdryomov/conspectus
A specification test engine for Kotlin based on the JUnit Platform
https://github.com/arturdryomov/conspectus
bdd junit-platform specification
Last synced: 9 months ago
JSON representation
A specification test engine for Kotlin based on the JUnit Platform
- Host: GitHub
- URL: https://github.com/arturdryomov/conspectus
- Owner: arturdryomov
- License: apache-2.0
- Created: 2018-12-02T20:04:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-16T17:48:19.000Z (over 6 years ago)
- Last Synced: 2025-06-27T23:35:13.526Z (about 1 year ago)
- Topics: bdd, junit-platform, specification
- Language: Kotlin
- Homepage:
- Size: 223 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Conspectus
A specification test engine for Kotlin based on the JUnit Platform.
Inspirations: [RSpec for Ruby](https://en.wikipedia.org/wiki/RSpec) and [Quick for Swift](https://github.com/Quick/Quick/).
Specifications are a declarative, scalable alternative to xUnit-style tests:
```kotlin
val counter by memoized { Counter() }
context("increment") {
beforeEach {
counter.increment()
}
it("changes value to 1") {
assertThat(counter.current()).isEqualTo(1)
}
context("decrement") {
beforeEach {
counter.decrement()
}
it("changes value to 0") {
assertThat(counter.current()).isEqualTo(0)
}
}
}
```
* [Motivation](docs/motivation.md)
* [Usage](docs/usage.md)
* [Recipes](docs/recipes.md)
## FAQ
### Should I use this?
No.
## License
```
Copyright 2019 Artur Dryomov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```