File: runtest-without-defined-steps.t

package info (click to toggle)
libtest-cukes-perl 0.09-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 200 kB
  • ctags: 155
  • sloc: perl: 1,959; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 480 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env perl -w
use strict;
use Test::More;
use Test::Cukes tests => 2;

feature(<<FEATURE_TEXT);
Feature: foo
  In order to bleh
  I want to bleh

  Scenario: blehbleh
    Given I am a missing person
    When blah2
    Then blah3
FEATURE_TEXT

# This regex shouldn't match.
my $hit_given = 0;
When qr/I am a missing (animal|alien)/i => sub {
  $hit_given = 1;
};

runtests;

is($hit_given, 0, "Correctly never ran the 'when' test"); 
ok(@Test::Cukes::missing_steps == 3);