[Jifty-commit] r3775 - in Test-WWW-Declare: t

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Aug 3 15:48:22 EDT 2007


Author: sartak
Date: Fri Aug  3 15:48:22 2007
New Revision: 3775

Added:
   Test-WWW-Declare/t/02-skip.t
Modified:
   Test-WWW-Declare/   (props changed)

Log:
 r29874 at caladan:  sartak | 2007-08-03 15:48:15 -0400
 Real SKIP tests


Added: Test-WWW-Declare/t/02-skip.t
==============================================================================
--- (empty file)
+++ Test-WWW-Declare/t/02-skip.t	Fri Aug  3 15:48:22 2007
@@ -0,0 +1,30 @@
+#!perl
+use Test::Tester tests => 9;
+use Test::WWW::Declare;
+use Test::WWW::Declare::Tester;
+use warnings;
+use strict;
+
+my @results = run_tests(
+    sub {
+        session "check logins" => run {
+            flow "basic connectivity" => check {
+                SKIP "Just testing skip";
+            };
+        };
+    }
+);
+
+shift @results; # Test::Tester gives 1-based arrays
+is(@results, 2, "had two tests");
+ok($results[0]{ok}, "1st test passed");
+ok($results[1]{ok}, "2nd test passed");
+
+is($results[0]{type}, "skip", "type was skip");
+like($results[0]{reason}, qr/^Just testing skip at/, "skip reason was right");
+is($results[0]{name}, "", "skipped test name doesn't appear");
+
+is($results[1]{type}, '', "session's type was empty");
+is($results[1]{skip}, undef, "no skip for session");
+is($results[1]{name}, "check logins", "2nd test was session");
+


More information about the Jifty-commit mailing list