Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do you have a recomendation on how to emulate cucumber tags in a coulda environment #9

Open
planglue opened this issue Jul 15, 2010 · 3 comments

Comments

@planglue
Copy link

http://wiki.github.com/aslakhellesoy/cucumber/tags

@elight
Copy link
Owner

elight commented Jul 15, 2010

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
    end
    

    end

  • 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.

@elight
Copy link
Owner

elight commented Dec 5, 2010

It's been a while but I'm considering adding this, or something like it, now.

@elight
Copy link
Owner

elight commented Dec 5, 2010

In particular, this is closely related to https://github.com/elight/coulda/issues#issue/10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants