File Coverage

examples/i18n_es/features/step_definitions/basic_steps.pl
Criterion Covered Total %
statement 35 35 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 45 45 100.0


line stmt bran cond sub pod time code
1             #!perl
2            
3 2     2   19 use strict;
  2         5  
  2         87  
4 2     2   11 use warnings;
  2         4  
  2         117  
5              
6 2     2   510 use Digest;
  2         816  
  2         62  
7              
8 2     2   11 use Test::More;
  2         6  
  2         25  
9 2     2   744 use Test::BDD::Cucumber::StepFile;
  2         5  
  2         4204  
10            
11             Dado qr/la clase "(\w+)"/, sub {
12 2     2   658 use_ok( C->matches->[0] );
  2     2   6  
  2     2   6  
  2     2   42  
  2     2   560  
  2         5  
  2         3  
  2         39  
  2         628  
  2         7  
  2         6  
  2         43  
  2         659  
  2         6  
  2         6  
  2         72  
  2         643  
  2         5  
  2         5  
  2         44  
13             };
14              
15             Dado qr/un objeto Digest usando el algoritmo "(\S+)"/, sub {
16             my $object = Digest->new( C->matches->[0] );
17             ok( $object, "Objecto creado" );
18             S->{'object'} = $object;
19             };
20              
21             Cuando qr/he agregado "(\w+)" al objeto/, sub {
22             S->{'object'}->add( C->matches->[0] );
23             };
24            
25             Cuando "he agregado los siguientes datos al objeto", sub {
26             S->{'object'}->add( C->data );
27             };
28              
29             Entonces qr/el resultado (?:en\s*)?(\w+) es "(.+)"/, sub {
30             my ( $type, $expected ) = @{ C->matches };
31             my $method = {
32             'base64' => 'b64digest',
33             'hexadecimal' => 'hexdigest'
34             }->{$type};
35              
36             is( S->{'object'}->$method(), $expected );
37             };