NAME
Test::Pcuke::StepRunner - Runner of the steps.
METHODS
new
Returns singleton object
destroy
Destroys the singleton so that the next new() creates another object
add_definition %definition
Adds a step definition. Keys of the %definition are:
- step_type One of 'GIVEN', 'WHEN', 'THEN', 'AND', 'BUT', '*'
- regexp A regular expression against that the step title should match
- coderef A reference to the code which should be executed if the title of the step matches the regexp
execute $step
Executes the step. Finds the first definition to whose regexp the step title match, then calls code of that definition passing to it three arguments
- $world Test::Pcuke::World, the object, which is the same for any step inside a scenario
- $text A multiline text associated with the step in *.feature file
- $table A Test::Pcuke::Gherkin::Node::Table object for the table associated with the step in the *.feature file
Returns Test::Pcuke::Executor::Status object with the status of the execution, which is 'undef' if no suitable definition is found.
reset_world
This method resets the $world object that is passed to step definition
set_world $world?
Set the new world
world
Returns the current world object that is passed to step definitions
AUTHOR
Andrei V. Toutoukine, <tut at isuct.ru>
BUGS
Please report any bugs or feature requests to bug-test-pcuke at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Pcuke. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Test::Pcuke::StepRunner
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2011 Andrei V. Toutoukine.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.