Test::BDD::Cucumber::Model::TagSpec - Encapsulates tag selectors
version 0.86
DEPRECATED - This module's functionality has been superseeded by Cucumber::TagExpressions. A module published by the Cucumber project, with cross-implementation tests to achieve overall consistency.
Try and deal with the crazy-sauce tagging mechanism in a sane way.
Cucumber tags are all sortsa crazy. This appears to be a direct result of trying to shoe-horn the syntax in to something you can use on the command line. Because 'Cucumber' is the name of a gem, application, language, methodology etc etc etc look of disapproval.
Here is some further reading on how it's meant to work: https://github.com/cucumber/cucumber/wiki/Tags. This is obviously a little insane.
Here's how they work here, on a code level: You pass in a list of lists that look like Lisp expressions, with a function: and, or, or not. You can nest these to infinite complexity, but the parser is pretty inefficient, so don't do that. The not function accepts only one argument.
and
or
not
eg:
@important AND @billing: <[and = 'important', 'billing']>>
<[and =
(@billing OR @WIP) AND @important: <[ and = [ or => 'billing', 'wip' ], 'important' ]>>
<[ and =
Skipping both @todo and @wip tags: <[ and = [ not => 'todo' ], [ not => 'wip' ] ]>>
An arrayref representing a structure like the above.
TagSet->new({ tags => [ and => 'green', 'blue', [ or => 'red', 'yellow' ], [ not => 'white' ] ] })
Filter a list of Scenarios by the value of tags
tags
my @matched = $tagset->filter( @scenarios );
If tags is empty, no filtering is done.
To install Test::BDD::Cucumber, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::BDD::Cucumber
CPAN shell
perl -MCPAN -e shell install Test::BDD::Cucumber
For more information on module installation, please visit the detailed CPAN module installation guide.