NAME

Test::Pcuke::Gherkin::Node::Step - Step of the scenario of the feature

SYNOPSIS

This module is used internally by L<Test::Pcuke::Gherkin>
 

METHODS

new $conf

Creates new step. $conf is a hashref that may contain the settings for the object. Without $conf the corresponding properties are unset. The keys of hashref are

type Type of the step: 'Given', 'when', 'then', 'and', 'but', '*'
title Title of the step (probably without the type)
text Multiline text associated with the step
table Table associated with the step
executor Executor object, see Test::Pcuke::Gherkin

type

Returns the type of the step

set_type $type

Sets the type of the step. Type is an immutable property and may be set only once. Trying to set it more than once is a fatal error

title

Returns the title of the step. If the step is parametrized, i.e. the original title contails placeholders in angle brackets (Scenario Outline steps), they are replaced with the step parameters if those are set.

set_title $title

Sets the title. Title is an immutable property.

set_text

Sets the text. Text is an immutable property

Returns the text associated with the step.

Returns the table associated with the step

set_table

Returns the tyable associated with the text

set_params $hash

Sets the step parameters which are used to replace the placeholders in the title if any. For example, if the title is 'm = <m>' the hash is {m => 'MMM'} then the title() returns 'm = "MMM"'

Note: this method is used in execute() and probably should be private. Don't use it %-)

ubset_params

Unsets params that are set by set_params.

Must be private, don't use

param_names

returns the names of the placeholders in the title If title is ' <m> = <n>' then returns ['m', 'n'] or ['n', 'm']

Must be private?

executor

Returns the executor object. See Test::Pcuke::Gherkin

execute

Executes the step.

result

Returns a result object. If the executor returns a string, then Test::Pcuke::Gherkin::Executor::Status object is created with the normalized status which is one of 'pass', 'undef', or 'fail'

status

Returns the status of the sexecuted step. The result object that is returned by executor->execute is asked for that.

AUTHOR

Andrei V. Toutoukine, <tut at isuct.ru>

BUGS

Please report any bugs or feature requests to bug-/home/tut/bin/src/test-pcuke-gherkin at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=/home/tut/bin/src/Test-Pcuke-Gherkin. 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::Gherkin::Node::Step

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2011 Andrei V. Toutoukine.

This program is released under the following license: artistic