Do you have a recomendation on how to emulate cucumber tags in a coulda environment
http://wiki.github.com/aslakhellesoy/cucumber/tags
As I understand it, tags are used primarily for running subsets of Cucumber features/scenarios/scenario outlines and allowing to logically AND and OR those tags as well.
You could possibly do the following:
-
Write a method in Feature that accumulates Tags
-
When Scenario is called, take the accumulated Tags in the containing Feature, assign them to the Scenario, and then empty the Tag list. This way the Tags only apply to the next Scenario. It would look something like this when used:
Feature "With tags" do
Tag :foo Tag :bar Scenario "Using tags" do # The "Using tags" Scenario would now have the tags "foo" and "bar" end Scenario "No tags" do # This Scenario wouldn't have any tags because the Tag list # for the Feature would clear between uses of Scenario endend
-
Define a new argument for your Rake Tasks that would be picked up by Coulda
I would hate to have multiple Coulda users/developers have to hack deeper T::U integration themselves. I'm leaning toward providing hooks to inject procs to be executed into "setup" and "teardown". That may do the trick.
It's been a while but I'm considering adding this, or something like it, now.
In particular, this is closely related to https://github.com/elight/coulda/issues#issue/10