Instinct 0.1.9 Release
I’m happy to announce the release of Instinct 0.1.9. This is a maintenance release that also allowed me to introduce some new features such as custom lifecycles. Other tidbits include multiple specification failures reported, Scala examples, additional Functional Java matchers (List, Either, Option), Maven bundle and a seperate source JAR.
Downloads are available from the project site.
Here’s the full list of changes:
- Core Features
- Custom specification lifecycles can now be plugged in using the @Context annotation. This would allow for example, a Spring application context to be initialised and wired into each specification method allowing integration-style specifications using a Spring beans.
- Multiple errors are now displayed when a specification fails with more than one exception.
- Expectation API
- Added
fj.data.Listmatchers:expect.that(List.nil().cons(1)).isEqualTo(List.nil().cons(1)) - Added
fj.data.Optionmatchers:expect.that(Some(1)).isSome(1),expect.that(foo.bar()).isNone(). - Added
fj.data.Eithermatchers:expect.that(error()).isLeft(runtimeException),expect.that(foo.bar()).isRight(42).
- Added
- Scala integration
- Added Scala stack example, showing the use of Instinct under Scala to spec out Scala code.
- Maven integration
- Added Maven bundle to allow uploading to central Maven repository.
- Packaging
- Moved source code out of main jar into instinct-<version>-sources.jar (for Maven).
- Moved javadoc into jar instead of zip instinct-<version>-javadoc.jar (for Maven).
- Infrastructure
- Upgraded to Functional Java 2.10.
- Downgraded (again) to CGLib 2.1.3 (for Maven integration).
- Bugs
- (Issue 21) Expected exception try-catch should only wrap specs, not before and after.
- (Issue 19) Throwing exception out of mocked code confused expected exception handling.
- (Issue 40) Formatting of multiple exception report could be nicer.