[Catalyst-commits] r13032 - Test-WWW-Mechanize-Catalyst/trunk/t
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Mon Mar 8 01:19:03 GMT 2010
Author: t0m
Date: 2010-03-08 01:19:03 +0000 (Mon, 08 Mar 2010)
New Revision: 13032
Modified:
Test-WWW-Mechanize-Catalyst/trunk/t/cookies.t
Test-WWW-Mechanize-Catalyst/trunk/t/two_app.t
Log:
Make test skips actually work, fixes RT#47037
Modified: Test-WWW-Mechanize-Catalyst/trunk/t/cookies.t
===================================================================
--- Test-WWW-Mechanize-Catalyst/trunk/t/cookies.t 2010-03-08 01:18:05 UTC (rev 13031)
+++ Test-WWW-Mechanize-Catalyst/trunk/t/cookies.t 2010-03-08 01:19:03 UTC (rev 13032)
@@ -4,20 +4,23 @@
use lib 'lib';
use Test::More;
-eval {
- require Catalyst::Plugin::Session;
- require Catalyst::Plugin::Session::State::Cookie;
-};
+BEGIN {
+ eval {
+ require Catalyst::Plugin::Session;
+ require Catalyst::Plugin::Session::State::Cookie;
+ };
-if ($@) {
- diag($@);
- plan skip_all => "Need Catalyst::Plugin::Session to run this test";
-} else {
- plan tests => 3;
+ if ($@) {
+ diag($@);
+ plan skip_all => "Need Catalyst::Plugin::Session to run this test";
+ exit 0;
+ }
}
use lib 't/lib';
use Test::WWW::Mechanize::Catalyst 'CattySession';
+plan tests => 3;
+
my $m = Test::WWW::Mechanize::Catalyst->new;
$m->credentials( 'user', 'pass' );
Modified: Test-WWW-Mechanize-Catalyst/trunk/t/two_app.t
===================================================================
--- Test-WWW-Mechanize-Catalyst/trunk/t/two_app.t 2010-03-08 01:18:05 UTC (rev 13031)
+++ Test-WWW-Mechanize-Catalyst/trunk/t/two_app.t 2010-03-08 01:19:03 UTC (rev 13032)
@@ -4,20 +4,23 @@
use Test::More;
use lib 't/lib';
-eval {
- require Catalyst::Plugin::Session;
- require Catalyst::Plugin::Session::State::Cookie;
-};
+BEGIN {
+ eval {
+ require Catalyst::Plugin::Session;
+ require Catalyst::Plugin::Session::State::Cookie;
+ };
-if ($@) {
- diag($@);
- plan skip_all => "Need Catalyst::Plugin::Session to run this test";
-} else {
- plan tests => 4;
+ if ($@) {
+ diag($@);
+ plan skip_all => "Need Catalyst::Plugin::Session to run this test";
+ exit 0;
+ }
}
use Test::WWW::Mechanize::Catalyst;
+plan tests => 4;
+
my $m1 = Test::WWW::Mechanize::Catalyst->new(catalyst_app => 'Catty');
my $m2 = Test::WWW::Mechanize::Catalyst->new(catalyst_app => 'CattySession');
More information about the Catalyst-commits
mailing list