Currently, I'm injecting a steps class into a JUnit test using Spring:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration...
class MyTest extends JUnitStories {
@Autowired private MySteps mySteps;
public List<CandidateSteps> candidateSteps() {
return new InstanceStepsFactory(configuration(), mySteps).createCandidateSteps();
}
...
}
I'd like to run JBehave with multiple threads, so I can't inject a singleton MySteps bean any longer.
I've read http://jira.codehaus.org/browse/JBEHAVE-492 but still can't see how to solve my problem.