Seems like I have a similar issue: 
http://jira.codehaus.org/browse/JBEHAVE-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
________________________________
Van: Roy de Kleijn [[email protected]]
Verzonden: vrijdag 21 september 2012 14:09
Aan: [email protected]
Onderwerp: RE: [jbehave-user] beforestory doesn't run if I specify examples

So, you can't have one @BeforeScenario method which is executed before 
scenarios with AND without examples?

Thanks,
Roy
________________________________
Van: Mauro Talevi [[email protected]]
Verzonden: vrijdag 21 september 2012 12:13
Aan: [email protected]
Onderwerp: Re: [jbehave-user] beforestory doesn't run if I specify examples

@BeforeScenario executes before each scenario.

@BeforeScenario(uponType=ScenarioType.EXAMPLE) executes before each example in 
a scenario.

The org/jbehave/examples/trader/stories/trader_is_alerted_of_status.story show 
this in action.

On 21/09/2012 10:45, Roy de Kleijn wrote:
This one doesn't work:
@BeforeScenario
public void beforeEachScenario() {
    // ...
}

This one is working for scenarios with examples, but not for scenarios without 
examples.

@BeforeScenario(uponType=ScenarioType.EXAMPLE)
public void beforeEachExampleScenario() {
    // ...
}

Do I something wrong? or how can I get it work for both cases?


________________________________
Van: Roy de Kleijn [[email protected]<mailto:[email protected]>]
Verzonden: vrijdag 21 september 2012 11:21
Aan: [email protected]<mailto:[email protected]>
Onderwerp: RE: [jbehave-user] beforestory doesn't run if I specify examples

I mean the code in the beforeScenario is not being executed..


________________________________
Van: Mauro Talevi 
[[email protected]<mailto:[email protected]>]
Verzonden: vrijdag 21 september 2012 11:16
Aan: [email protected]<mailto:[email protected]>
Onderwerp: Re: [jbehave-user] beforestory doesn't run if I specify examples

What do you mean by "beforestory doesn't run"?

On 21/09/2012 10:15, Roy de Kleijn wrote:
Hi,

Is it true that we can't use beforestory if we like to specify Examples?
In my case it isn't executed, only if I remove the examples.


Thanks,
Roy


Reply via email to