cucumber-attic / cuke4duke

Cucumber support for the JVM: Java, Scala, Groovy, Clojure, Ioke, Javascript, Spring, Guice, PicoContainer, WebDriver, Ant and Maven
http://wiki.github.com/aslakhellesoy/cuke4duke
MIT License
256 stars 72 forks source link

@Before("@scenario") does not work as expected #38

Closed olemartin closed 15 years ago

olemartin commented 15 years ago

I thought that an @Before("scenario") should only be ran before scenarios that had the @scenario annotation. However, it seems like the @Before method is ran before all scenarios.

aslakhellesoy commented 15 years ago

You're right. I have reproduced it on trunk. What Cuke4duke and Cucumber versions are you using?

BTW, @Before("@mytag") is the way to use it, @Before("mytag") - without the @ should ideally not be run ever. Once this bug is fixed that is.

olemartin commented 15 years ago

I followed the example here: http://github.com/aslakhellesoy/cuke4duke/tree/master/examples/java-webdriver/ I am using cuke4duke 0.1.8 and cucumber 0.4.3

aslakhellesoy commented 15 years ago

Let the ruby side handle tag filtering. We weren't doing any tag filtering at all. Closed by 76f6df114e50cac1c6e573c5a8605a446e4e4b73.

aslakhellesoy commented 15 years ago

Beware that you need trunk of cucumber to use this. I had to make a little change there too. So build everything yourself or wait for a new release of both.