Details
Description
In acceptance/integration tests is often common to have a lightweight container (Pico, Spring, Guice, etc ...) to configure the tests with.
A container-supported Steps instance should be composable (either via constructor or setter dependency injection) with components configured in the container.
Each container support will be contained in a separate optional module.
We start with Pico support, with other containers to follow.
I created a pretty nice way to break the JBehave Inheritance Hierarchy that isn't framework specific. Instead of inheriting from Scenario, it allows you to delegate to a class that does so. If something like this were integrated directly into JBehave, then framework-specific code would be minimal:
http://blog.davidron.com/2009/12/breaking-jbehave-inheritance-hierarchy.html
My company uses this code to run Jbehave tests inside of a standard spring container. It works with both annotation-driven spring classes and with test classes that extend AbstractTransactionalSpringContextTests.
It also supports finding the steps configuration file by name (string) or class name.