Test-BDD-Cucumber
view release on metacpan or search on metacpan
t/lib/Test/CucumberExtensionMetadataVerify.pm view on Meta::CPAN
sub pre_step {
my ($self, $step, $step_context) = @_;
croak 'pre_step called with incorrect number $step array elements'
if scalar(@$step) != 3;
croak 'pre_step called with incorrect first element type of $step array'
# 5.10 reports SCALAR where the argument actually is a regexp; ignore <=5.10
if reftype $step->[0] ne 'REGEXP' and $] ge '5.012';
croak 'pre_step called with incorrect second element type of $step array'
if reftype $step->[1] ne 'HASH';
croak 'pre_step called with incorrect meta data content in $step array'
if exists $step->[1]->{meta} and $step->[1]->{meta} ne 'data';
croak 'pre_step called with incorrect third element type of $step array'
if reftype $step->[2] ne 'CODE';
}
( run in 1.624 second using v1.01-cache-2.11-cpan-cc502c75498 )