line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
17
|
|
|
17
|
|
252
|
use v5.14; |
|
17
|
|
|
|
|
69
|
|
2
|
17
|
|
|
17
|
|
118
|
use warnings; |
|
17
|
|
|
|
|
41
|
|
|
17
|
|
|
|
|
712
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::BDD::Cucumber::Model::Step 0.85; |
5
|
|
|
|
|
|
|
|
6
|
17
|
|
|
17
|
|
112
|
use Moo; |
|
17
|
|
|
|
|
46
|
|
|
17
|
|
|
|
|
123
|
|
7
|
17
|
|
|
17
|
|
6008
|
use Types::Standard qw( Str ArrayRef InstanceOf ); |
|
17
|
|
|
|
|
88
|
|
|
17
|
|
|
|
|
275
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Test::BDD::Cucumber::Model::Step - Model to represent a step in a scenario |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 VERSION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
version 0.85 |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Model to represent a step in a scenario |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head2 text |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
The text of the step, once Scenario Outlines have been applied |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=cut |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has 'text' => ( is => 'rw', isa => Str ); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 verb |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 verb_original |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
The verb used for the step ('Given'/'When'/etc). C is the one |
36
|
|
|
|
|
|
|
that appeared in the physical file - this will sometimes be C. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
has 'verb' => ( is => 'rw', isa => Str ); |
41
|
|
|
|
|
|
|
has 'verb_original' => ( is => 'rw', isa => Str ); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 line |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
The corresponding L |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has 'line' => ( is => 'rw', isa => InstanceOf['Test::BDD::Cucumber::Model::Line'] ); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 data |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Step-related data. Either a string in the case of C<"""> or an arrayref of |
54
|
|
|
|
|
|
|
hashrefs for a data table. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
has 'data' => ( is => 'rw' ); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 data_as_strings |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
An arrayref of strings containing the original step's data, for printing out |
63
|
|
|
|
|
|
|
by harnesses |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
has 'data_as_strings' => ( |
68
|
|
|
|
|
|
|
is => 'rw', |
69
|
|
|
|
|
|
|
default => sub { [] }, |
70
|
|
|
|
|
|
|
isa => ArrayRef[Str] |
71
|
|
|
|
|
|
|
); |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 columns |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
If data was in a table format, then the column names will be here in the order |
76
|
|
|
|
|
|
|
they appeared. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
has 'columns' => ( is => 'rw', isa => ArrayRef[Str] ); |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Peter Sergeant C |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 LICENSE |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Copyright 2019-2023, Erik Huelsmann |
89
|
|
|
|
|
|
|
Copyright 2011-2019, Peter Sergeant; Licensed under the same terms as Perl |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=cut |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
1; |