[Catalyst-commits] r12455 - in
Catalyst-Plugin-Unicode-Encoding/trunk: . t
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Mon Dec 21 21:29:24 GMT 2009
Author: t0m
Date: 2009-12-21 21:29:24 +0000 (Mon, 21 Dec 2009)
New Revision: 12455
Modified:
Catalyst-Plugin-Unicode-Encoding/trunk/Changes
Catalyst-Plugin-Unicode-Encoding/trunk/Makefile.PL
Catalyst-Plugin-Unicode-Encoding/trunk/t/04live.t
Catalyst-Plugin-Unicode-Encoding/trunk/t/05config.t
Log:
Get out of the dep chain please, this WWW::Mech is playing up again..
Modified: Catalyst-Plugin-Unicode-Encoding/trunk/Changes
===================================================================
--- Catalyst-Plugin-Unicode-Encoding/trunk/Changes 2009-12-21 20:34:02 UTC (rev 12454)
+++ Catalyst-Plugin-Unicode-Encoding/trunk/Changes 2009-12-21 21:29:24 UTC (rev 12455)
@@ -1,5 +1,7 @@
Revision history for Perl extension Catalyst::Plugin::Unicode::Encoding
+ - Make Test::WWW::Mechanize::Catalyst an optional dependency.
+
0.6 2009-11-16 20:45:43
- Fix missing dependency for the tests.
- Avoid LWP releases which break the tests by messing up unicode.
Modified: Catalyst-Plugin-Unicode-Encoding/trunk/Makefile.PL
===================================================================
--- Catalyst-Plugin-Unicode-Encoding/trunk/Makefile.PL 2009-12-21 20:34:02 UTC (rev 12454)
+++ Catalyst-Plugin-Unicode-Encoding/trunk/Makefile.PL 2009-12-21 21:29:24 UTC (rev 12455)
@@ -1,4 +1,5 @@
use inc::Module::Install 0.91;
+use Module::Install::AuthorRequires;
all_from 'lib/Catalyst/Plugin/Unicode/Encoding.pm';
@@ -6,7 +7,8 @@
requires 'Catalyst' => '5.80';
requires 'LWP' => '5.828'; # LWP had unicode fail in 5.8.26
-test_requires 'Test::WWW::Mechanize::Catalyst' => 0.51;
+author_requires 'Test::WWW::Mechanize::Catalyst' => 0.51;
+test_requires 'Test::More' => '0.88';
test_requires 'IO::Scalar';
resources repository => 'http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Plugin-Unicode-Encoding/';
Modified: Catalyst-Plugin-Unicode-Encoding/trunk/t/04live.t
===================================================================
--- Catalyst-Plugin-Unicode-Encoding/trunk/t/04live.t 2009-12-21 20:34:02 UTC (rev 12454)
+++ Catalyst-Plugin-Unicode-Encoding/trunk/t/04live.t 2009-12-21 21:29:24 UTC (rev 12455)
@@ -2,15 +2,21 @@
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More;
use IO::Scalar;
# setup library path
use FindBin qw($Bin);
use lib "$Bin/lib";
+BEGIN {
+if ( !eval { require Test::WWW::Mechanize::Catalyst } ) {
+ plan skip_all => 'Need Test::WWW::Mechanize::Catalyst for this test';
+}
+}
+
# make sure testapp works
-BEGIN { use_ok('TestApp') or BAIL_OUT($@) };
+use_ok('TestApp') or BAIL_OUT($@);
our $TEST_FILE = IO::Scalar->new(\"this is a test");
sub IO::Scalar::FILENO { -1 }; # needed?
@@ -75,3 +81,5 @@
is ($got, $exp, 'content octets are UTF-8');
}
+done_testing;
+
Modified: Catalyst-Plugin-Unicode-Encoding/trunk/t/05config.t
===================================================================
--- Catalyst-Plugin-Unicode-Encoding/trunk/t/05config.t 2009-12-21 20:34:02 UTC (rev 12454)
+++ Catalyst-Plugin-Unicode-Encoding/trunk/t/05config.t 2009-12-21 21:29:24 UTC (rev 12455)
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More;
BEGIN { $ENV{TESTAPP_ENCODING} = 'UTF-8' };
@@ -10,10 +10,15 @@
use FindBin qw($Bin);
use lib "$Bin/lib";
-# make sure testapp works
BEGIN {
-use_ok('TestApp') };
+if ( !eval { require Test::WWW::Mechanize::Catalyst } ) {
+ plan skip_all => 'Need Test::WWW::Mechanize::Catalyst for this test';
+}
+}
+# make sure testapp works
+use_ok('TestApp');
+
use Test::WWW::Mechanize::Catalyst 'TestApp';
my $mech = Test::WWW::Mechanize::Catalyst->new;
@@ -22,3 +27,5 @@
$mech->get_ok('http://localhost/unicode', 'encoding configured ok');
}
+done_testing;
+
More information about the Catalyst-commits
mailing list