Skip to content

Instantly share code, notes, and snippets.

@SebAshton
Last active December 12, 2015 01:18
Show Gist options
  • Save SebAshton/4690095 to your computer and use it in GitHub Desktop.
Save SebAshton/4690095 to your computer and use it in GitHub Desktop.
A code snippet the allows you to run specific Cucumber Feature/Scenarios that have been tagged

Add the below command into your pre existing cucumber rake task, within the namespace block.

Cucumber::Rake::Task.new(:tags) do |t|
    t.cucumber_opts = "--tags #{ ARGV.last }"
end

All this does is add the --tags option to the executed command line.

usage: rake cucumber:tags @mytag

For more information about tagging your features see this article on the Cucumber wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment