[Catalyst-commits] r10607 - in
Catalyst-Runtime/5.80/branches/index_default_fuckage: . t
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sun Jun 21 00:19:34 GMT 2009
Author: caelum
Date: 2009-06-21 00:19:34 +0000 (Sun, 21 Jun 2009)
New Revision: 10607
Modified:
Catalyst-Runtime/5.80/branches/index_default_fuckage/
Catalyst-Runtime/5.80/branches/index_default_fuckage/Changes
Catalyst-Runtime/5.80/branches/index_default_fuckage/Makefile.PL
Catalyst-Runtime/5.80/branches/index_default_fuckage/t/deprecated.t
Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_component_loading.t
Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_plugin.t
Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_setup.t
Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_setup_stats.t
Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_uri_for.t
Log:
r5579 at hlagh (orig r10594): t0m | 2009-06-19 13:35:41 -0700
Just initialize a logger which only logs fatal errors, no mock needed
r5580 at hlagh (orig r10595): t0m | 2009-06-19 13:39:19 -0700
Remove Test::MockObject
r5581 at hlagh (orig r10596): t0m | 2009-06-19 13:39:58 -0700
Remove Test::MockObject
r5582 at hlagh (orig r10597): t0m | 2009-06-19 13:41:46 -0700
Remove MockObject
r5583 at hlagh (orig r10598): t0m | 2009-06-19 13:44:15 -0700
1 more MockObject removal
r5584 at hlagh (orig r10599): t0m | 2009-06-19 13:46:45 -0700
Remove MockObject from Makefile.PL
r5596 at hlagh (orig r10605): t0m | 2009-06-20 16:23:19 -0700
Re-add lukes specific regression test from r10498
r5597 at hlagh (orig r10606): t0m | 2009-06-20 16:25:31 -0700
Update test to be TODO, and note this case used to fail on 5.7
Property changes on: Catalyst-Runtime/5.80/branches/index_default_fuckage
___________________________________________________________________
Name: svk:merge
- 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/compres:7999
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/context_go:8001
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:8533
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/Catalyst-Test-Updates:8363
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/add_captures_to_visit:9546
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7911
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
8a9521aa-ff93-41d6-9f87-b05cafcdab40:/local/cat/Catalyst-Runtime/5.80/trunk:8157
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
+ 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/compres:7999
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/context_go:8001
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:8533
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/Catalyst-Test-Updates:8363
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/add_captures_to_visit:9546
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7911
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/trunk:10606
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
8a9521aa-ff93-41d6-9f87-b05cafcdab40:/local/cat/Catalyst-Runtime/5.80/trunk:8157
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
Modified: Catalyst-Runtime/5.80/branches/index_default_fuckage/Changes
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/Changes 2009-06-20 23:25:31 UTC (rev 10606)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/Changes 2009-06-21 00:19:34 UTC (rev 10607)
@@ -4,6 +4,8 @@
- Revert change to URL encode things passed into $c->uri_for
Args and CaptureArgs as this causes breakage to pre-existing
applications.
+ - Remove use of Test::MockObject as it doesn't install from CPAN
+ in some environments.
5.80005 2009-06-06 14:40:00
Modified: Catalyst-Runtime/5.80/branches/index_default_fuckage/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/Makefile.PL 2009-06-20 23:25:31 UTC (rev 10606)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/Makefile.PL 2009-06-21 00:19:34 UTC (rev 10607)
@@ -38,9 +38,6 @@
recommends 'B::Hooks::OP::Check::StashChange';
test_requires 'Class::Data::Inheritable';
-test_requires 'Test::MockObject' => '1.07'; # Newish (hah, 2006!) version to
- # hopefully avoid broken distro
- # packages (RT#46104)
test_requires 'Test::Exception';
# aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate is available
Modified: Catalyst-Runtime/5.80/branches/index_default_fuckage/t/deprecated.t
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/t/deprecated.t 2009-06-20 23:25:31 UTC (rev 10606)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/t/deprecated.t 2009-06-21 00:19:34 UTC (rev 10607)
@@ -5,7 +5,6 @@
use FindBin qw/$Bin/;
use lib "$Bin/lib";
use Test::More tests => 4;
-use Test::MockObject;
my $warnings;
BEGIN { # Do this at compile time in case we generate a warning when use
@@ -15,8 +14,17 @@
use Catalyst; # Cause catalyst to be used so I can fiddle with the logging.
my $mvc_warnings;
BEGIN {
- my $logger = Test::MockObject->new;
- $logger->mock('warn', sub { $mvc_warnings++ if $_[1] =~ /switch your class names/ });
+ my $logger = Class::MOP::Class->create_anon_class(
+ methods => {
+ warn => sub {
+ if ($_[1] =~ /switch your class names/) {
+ $mvc_warnings++;
+ return;
+ }
+ die "Caught unexpected warning: " . $_[1];
+ },
+ },
+)->new_object;
Catalyst->log($logger);
}
Modified: Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_component_loading.t
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_component_loading.t 2009-06-20 23:25:31 UTC (rev 10606)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_component_loading.t 2009-06-21 00:19:34 UTC (rev 10607)
@@ -9,8 +9,6 @@
use File::Spec;
use File::Path;
-use Test::MockObject;
-
my $libdir = 'test_trash';
unshift(@INC, $libdir);
@@ -85,15 +83,7 @@
}
my $shut_up_deprecated_warnings = q{
- use Test::MockObject;
- my $old_logger = __PACKAGE__->log;
- my $logger = Test::MockObject->new;
- $logger->mock('warn', sub {
- my $self = shift;
- return if $_[0] =~ /deprecated/;
- $old_logger->warn(@_);
- });
- __PACKAGE__->log($logger);
+ __PACKAGE__->log(Catalyst::Log->new('fatal'));
};
eval "package $appclass; use Catalyst; $shut_up_deprecated_warnings __PACKAGE__->setup";
Modified: Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_plugin.t
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_plugin.t 2009-06-20 23:25:31 UTC (rev 10606)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_plugin.t 2009-06-21 00:19:34 UTC (rev 10607)
@@ -2,7 +2,6 @@
use strict;
use warnings;
-use Test::MockObject::Extends;
use Test::More tests => 24;
@@ -20,15 +19,18 @@
my $warnings = 0;
use PluginTestApp;
-my $logger = Test::MockObject::Extends->new(PluginTestApp->log);
-$logger->mock('warn', sub {
- if ($_[1] =~ /plugin method is deprecated/) {
- $warnings++;
- return;
- }
- die "Caught unexpected warning: " . $_[1];
-});
-#PluginTestApp->log($logger);
+my $logger = Class::MOP::Class->create_anon_class(
+ methods => {
+ warn => sub {
+ if ($_[1] =~ /plugin method is deprecated/) {
+ $warnings++;
+ return;
+ }
+ die "Caught unexpected warning: " . $_[1];
+ },
+ },
+)->new_object;
+PluginTestApp->log($logger);
use Catalyst::Test qw/PluginTestApp/;
Modified: Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_setup.t
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_setup.t 2009-06-20 23:25:31 UTC (rev 10606)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_setup.t 2009-06-21 00:19:34 UTC (rev 10607)
@@ -1,5 +1,6 @@
use strict;
use warnings;
+use Class::MOP::Class;
use Catalyst::Runtime;
use Test::More tests => 29;
@@ -67,13 +68,13 @@
ok $log->is_debug, 'Debugging should be enabled';
ok !$c->debug, 'Catalyst debugging turned off';
}
+my $log_meta = Class::MOP::Class->create_anon_class(
+ methods => { map { $_ => sub { 0 } } qw/debug error fatal info warn/ },
+);
{
package MyTestAppWithOwnLogger;
use base qw/Catalyst/;
- use Test::MockObject;
- my $log = Test::MockObject->new;
- $log->set_false(qw/debug error fatal info warn/);
- __PACKAGE__->log($log);
+ __PACKAGE__->log($log_meta->new_object);
__PACKAGE__->setup('-Debug');
}
Modified: Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_setup_stats.t
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_setup_stats.t 2009-06-20 23:25:31 UTC (rev 10606)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_setup_stats.t 2009-06-21 00:19:34 UTC (rev 10607)
@@ -2,18 +2,22 @@
use warnings;
use Test::More tests => 5;
-use Test::MockObject;
+use Class::MOP::Class;
use Catalyst ();
my %log_messages; # TODO - Test log messages as expected.
-my $mock_log = Test::MockObject->new;
-foreach my $level (qw/debug info warn error fatal/) {
- $mock_log->mock($level, sub {
- $log_messages{$level} ||= [];
- push(@{ $log_messages{$level} }, $_[1]);
- });
-}
+my $mock_log = Class::MOP::Class->create_anon_class(
+ methods => {
+ map { my $level = $_;
+ $level => sub {
+ $log_messages{$level} ||= [];
+ push(@{ $log_messages{$level} }, $_[1]);
+ },
+ }
+ qw/debug info warn error fatal/,
+ },
+)->new_object;
sub mock_app {
my $name = shift;
Modified: Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_uri_for.t
===================================================================
--- Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_uri_for.t 2009-06-20 23:25:31 UTC (rev 10606)
+++ Catalyst-Runtime/5.80/branches/index_default_fuckage/t/unit_core_uri_for.t 2009-06-21 00:19:34 UTC (rev 10607)
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More tests => 18;
+use Test::More tests => 19;
use URI;
use_ok('Catalyst');
@@ -51,6 +51,11 @@
'http://127.0.0.1/foo/yada/bar/wibble%3F/with%20space', 'Space gets encoded'
);
+is(
+ Catalyst::uri_for( $context, '/bar', 'with+plus', { 'also' => 'with+plus' })->as_string,
+ 'http://127.0.0.1/foo/bar/with+plus?also=with%2Bplus',
+ 'Plus is not encoded'
+);
# test with utf-8
is(
@@ -118,12 +123,13 @@
'http://127.0.0.1/%21/%2A/%27/%2B/%29/%3B/%3A/%40/%26/%3D/%24/%2C/%2F/%3F/%25/%23/%5B/%5D',
'rfc 3986 reserved characters'
);
+
+ # jshirley bug - why the hell does only one of these get encoded
+ # has been like this forever however.
+ is(
+ Catalyst::uri_for( $context, qw|{1} {2}| )->as_string,
+ 'http://127.0.0.1/{1}/{2}',
+ 'not-escaping unreserved characters'
+ );
}
-# jshirley bug t0m fucked in r10097
-is(
- Catalyst::uri_for( $context, qw|{1} {2}| )->as_string,
- 'http://127.0.0.1/{1}/{2}',
- 'not-escaping unreserved characters'
-);
-
More information about the Catalyst-commits
mailing list