I have just finished reading the section about Guice.
I can see from the cucumber codebase on github, that Guice now supports a new scope:
(Change was from April 2014)
The chapter about Guice does not mention
@ScenarioScoped as an option for injecting stepdefs / objects using scenario scope.
I was under the impression that PicoContainer always used scenario scope, where a new instance of an object is created for each scenario. And using
@ScenarioScoped as the scope would reproduce this behaviour instead of using
I was under the impression that
@Singleton scope would allow object instances to be shared by all scenarios in a feature and all features that are part of the test run - which is what I need and the reason why I am considering switching from PicoContainer to Guice.
Can you please clarify this behaviour for me and add to the chapter to include this information as I think it would be very helpful.