Hey Mauro, Had a look at the fix you put in for JBEHAVE-384, and it wasn't quite what I meant. Basically given:
Story A: Given insert some test data Story B: GivenStories storyA When do something Then test something Then the step order is currently Given insert some test data @BeforeScenario When do something Then test something @AfterScenario I was after this @BeforeScenario Given insert some test data When do something Then test something @AfterScenario I've pushed a patch to my github fork to change this. If there's anything I missed please give me a shout and I'll try and fix it. Dan. On 11 November 2010 18:46, Mauro Talevi <mauro.tal...@aquilonia.org> wrote: > http://jira.codehaus.org/browse/JBEHAVE-384 > > On 08/11/2010 17:18, Mauro Talevi wrote: > > Hi Dan, > > > > what you describe is currently not supported. Not difficult add a > > configuration option to StoryControls to allow Before/AfterScenario > > steps to be collected only if not executed as part of a GivenStory. > > > > Please raise a Jira issue. > > > > Cheers > > > > On 08/11/2010 16:00, Dan Godfrey wrote: > >> Hi, > >> > >> I'm currently using @BeforeStory to delete data from all the tables in > >> a database, then @Given steps to populate with the test data. Using > >> @BeforeStory means that I can now only have 1 Scenario in each Story, > >> as some of the test data is duplicated across the different scenarios. > >> But when I use @BeforeScenario instead, the code to clear the database > >> is called once for the scenario, but then once also for each > >> GivenStory within a scenario. > >> > >> I'm after a middle way, some way to call code every scenario, but then > >> not for each of the GivenStories. > >> > >> Thanks, > >> Dan. > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >