Test::Pcuke::Gherkin - roll your own cucumber
Version 0.000001
This module compiles text in Gherkin to the executable AST. If you don't like Test::Pcuke you can roll your own BDD cucumber-like tool!
use Test::Pcuke::Gherkin; my $feature = Test::Pcuke::Gherkin->compile($content, $executor); $feature->execute; ...
$content is a text in Gherkin language. It should be decoded string, not octets, especially if the text is written in language other than english
$executor is (optional) object, that has execute() method. If $executor is not provided an internal and useless one is used to execute the steps. See 'ON EXECUTORS' below;
Returns Test::Pcuke::Gherkin::Node::Feature object (feature object)
Executor that passed to the compile() method is an object whose behaviour depends on your goals. It should have execute() method which accepts Test::Pcuke::Gherkin::Node::Step object so that it can do something with the step. For example:
package Local::MyExecutor; sub execute { my ($self, $step) = @_; print $step->title; return 'undef'; } 1;
execute() method is expected to return a status, which can be either a status string or an object. in the latter case the object is expected to have status() method which return a status string.
The meaning of the status string is:
If no executor is provided a dumb default is used. It says that all steps are undefined and warns on each step that the executor does nothing with the step $step->title.
"Andrei V. Toutoukine", <"tut at isuct.ru">
<"tut at isuct.ru">
Please report any bugs or feature requests to bug-test-pcuke-gherkin at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Pcuke-Gherkin. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-test-pcuke-gherkin at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Test::Pcuke::Gherkin
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Pcuke-Gherkin
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Test-Pcuke-Gherkin
CPAN Ratings
http://cpanratings.perl.org/d/Test-Pcuke-Gherkin
Search CPAN
http://search.cpan.org/dist/Test-Pcuke-Gherkin/
Copyright 2011 "Andrei V. Toutoukine".
This program is released under the following license: artistic
To install Test::Pcuke::Gherkin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Pcuke::Gherkin
CPAN shell
perl -MCPAN -e shell install Test::Pcuke::Gherkin
For more information on module installation, please visit the detailed CPAN module installation guide.