examples/tagged-digest/features/step_definitions/basic_steps.pl

filter: Statementstmt 100% 85 / 85 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 25 / 25 Podpod n/a totaltotal 100% 110 / 110 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« examples/i18n_es/features/step_definitions/basic_steps.pl ↑ Summary
1 #!perl
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use Digest;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use Test::More;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use Test::BDD::Cucumber::StepFile;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 ▶Given qr/a usable "(\w+)" class/, sub { use_ok( C->matches->[0] ); };
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
11 10 ▶Given qr/a Digest (\S+) object/, sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
12 10 my $object = Digest->new( C->matches->[0] );
13 10 ok( $object, "Object created" );
14 10 S->{'object'} = $object;
15 3 };
16  
17 10 ▶When qr/I've added "(.+)" to the object/, sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
18 10 S->{'object'}->add( C->matches->[0] );
19 3 };
20  
21 2 ▶When "I've added the following to the object", sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
22 2 S->{'object'}->add( C->data );
23 3 };
24  
25 12 ▶Then qr/the (.+) output is "(.+)"/, sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
26 12 my ( $type, $expected ) = @{ C->matches };
27 my $method = {
28 'base64' => 'b64digest',
29 'hex' => 'hexdigest'
30 12 }->{$type};
31  
32 12 is( S->{'object'}->$method, $expected );
33 3 };
« examples/i18n_es/features/step_definitions/basic_steps.pl ↑ Summary