1
by Christine Spang
Import upstream version 0.08 |
1 |
#!/usr/bin/env perl
|
2 |
use strict; |
|
3 |
use warnings; |
|
4 |
||
5 |
# test.pl
|
|
6 |
use Test::More; |
|
7 |
use Test::Cukes; |
|
8 |
||
9 |
feature(<<TEXT); |
|
10 |
Feature: writing behavior tests |
|
11 |
In order to make me happy |
|
12 |
As a test maniac |
|
13 |
I want to write behavior tests |
|
14 |
||
15 |
Scenario: Hello World |
|
16 |
Given the test program is running |
|
17 |
When it reaches this step |
|
18 |
Then it should pass |
|
19 |
TEXT
|
|
20 |
||
21 |
Given qr/the test program is running/, sub { |
|
22 |
pass("running"); |
|
23 |
};
|
|
24 |
||
25 |
When qr/it reaches this step/, sub { |
|
26 |
pass("reaches"); |
|
27 |
};
|
|
28 |
||
29 |
Then qr/it should pass/, sub { |
|
30 |
pass("passes"); |
|
31 |
};
|
|
32 |
||
33 |
plan tests => 3; |
|
34 |
runtests; |