File: runtest-with-arg.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 (37 lines) | stat: -rw-r--r-- 621 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
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env perl -w
use strict;
use Test::Cukes;
my @passed;

Given qr/blah1/ => sub {
    push @passed, 1;

    assert @passed == 1;
};

When qr/blah2/ => sub {
    push @passed, 2;
    assert @passed == 2;
};

Then qr/blah3/ => sub {
    push @passed, 3;
    assert @passed == 3;

    # We can't use is_deeply because Test::More doesn't play nice with
    # Cukes's plan.
    assert 1 == $passed[0];
    assert 2 == $passed[1];
    assert 3 == $passed[2];
};

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

  Scenario: blehbleh
    Given blah1
    When blah2
    Then blah3
FEATURE_TEXT