Debian Codegraph @

t/harness_json/step_definitions/mock_steps.pl

raw
1 #!perl
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7 use Test::BDD::Cucumber::StepFile;
8
9 Given qr/we have list of items="([^"]*)"/ => sub {
10 S->{items} = [ split /,\s*/, $1 ];
11 };
12
13 When 'calculate count' => sub {
14 S->{count} = scalar @{ S->{items} };
15 };
16
17 Then qr/number of items is "([^"]*)"/ => sub {
18 is( S->{count}, $1 );
19 };
20
21 Given qr/that we receive list of items from server/ => sub {
22 local $TODO = "mock TODO message";
23 ok(0);
24 };