Permalink
Browse files

import Test-Cukes 0.07 from CPAN

git-cpan-module:   Test-Cukes
git-cpan-version:  0.07
git-cpan-authorid: GUGOD
git-cpan-file:     authors/id/G/GU/GUGOD/Test-Cukes-0.07.tar.gz
  • Loading branch information...
1 parent 4ed4724 commit f14a15498bba9146f4720437761034e35ac0b210 @gugod committed with schwern Jul 11, 2009
Showing with 12 additions and 11 deletions.
  1. +3 −0 Changes
  2. +2 −1 META.yml
  3. +2 −0 Makefile.PL
  4. +1 −1 lib/Test/Cukes.pm
  5. +0 −1 lib/Test/Cukes/Feature.pm
  6. +4 −8 lib/Test/Cukes/Scenario.pm
View
@@ -1,5 +1,8 @@
# Revision history for Perl extension Test::Cukes
+0.07:
+- makes it perl 5.8 compatible. thanks to miyagawa++
+
0.06:
- let runtests accept feature text too
View
@@ -24,6 +24,7 @@ requires:
Any::Moose: 0.07
Carp::Assert: 0.20
Exporter::Lite: 0.02
+ perl: 5.8.0
resources:
license: http://opensource.org/licenses/mit-license.php
-version: 0.06
+version: 0.07
View
@@ -2,6 +2,8 @@ use inc::Module::Install;
name 'Test-Cukes';
all_from 'lib/Test/Cukes.pm';
+perl_version '5.008';
+
requires
"Carp::Assert" => "0.20",
"Any::Moose" => "0.07",
View
@@ -6,7 +6,7 @@ use Test::More;
use Test::Cukes::Feature;
use Carp::Assert;
-our $VERSION = "0.06";
+our $VERSION = "0.07";
our @EXPORT = qw(feature runtests Given When Then assert affirm should shouldnt);
our @missing_steps = ();
@@ -1,6 +1,5 @@
package Test::Cukes::Feature;
use Any::Moose;
-use 5.010;
use Test::Cukes::Scenario;
View
@@ -1,6 +1,5 @@
package Test::Cukes::Scenario;
use Any::Moose;
-use 5.010;
has name => (
is => "rw",
@@ -24,13 +23,10 @@ sub BUILDARGS {
};
for my $line (split /\n+/, $scenario_text) {
- given ($line) {
- when (/^Scenario:\s(.+)$/) {
- $args->{name} = $1;
- }
- when (/^ (Given|When|Then|And)\s(.+)$/) {
- push @{$args->{ steps }}, "$1 $2";
- }
+ if ($line =~ /^Scenario:\s(.+)$/) {
+ $args->{name} = $1;
+ } elsif ($line =~ /^ (Given|When|Then|And)\s(.+)$/) {
+ push @{$args->{ steps }}, "$1 $2";
}
}

0 comments on commit f14a154

Please sign in to comment.