[Catalyst-commits] r6801 - in trunk/Catalyst-View-Mason/t: . lib
lib/TestApp/View/Mason
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Tue Aug 28 17:03:42 GMT 2007
Author: rafl
Date: 2007-08-28 17:03:41 +0100 (Tue, 28 Aug 2007)
New Revision: 6801
Modified:
trunk/Catalyst-View-Mason/t/exception.t
trunk/Catalyst-View-Mason/t/extension.t
trunk/Catalyst-View-Mason/t/globals.t
trunk/Catalyst-View-Mason/t/lib/TestApp.pm
trunk/Catalyst-View-Mason/t/lib/TestApp/View/Mason/Extension.pm
Log:
Make all tests that don't require something else use the AppConfig view as a
default and allow the TestApps log object to be overwritten.
Modified: trunk/Catalyst-View-Mason/t/exception.t
===================================================================
--- trunk/Catalyst-View-Mason/t/exception.t 2007-08-28 16:03:36 UTC (rev 6800)
+++ trunk/Catalyst-View-Mason/t/exception.t 2007-08-28 16:03:41 UTC (rev 6801)
@@ -9,6 +9,6 @@
use_ok('Catalyst::Test', 'TestApp');
-my $response = request('/exception?view=Pkgconfig');
+my $response = request('/exception?view=Appconfig');
ok(!$response->is_success, 'request fails');
Modified: trunk/Catalyst-View-Mason/t/extension.t
===================================================================
--- trunk/Catalyst-View-Mason/t/extension.t 2007-08-28 16:03:36 UTC (rev 6800)
+++ trunk/Catalyst-View-Mason/t/extension.t 2007-08-28 16:03:41 UTC (rev 6801)
@@ -9,7 +9,7 @@
use_ok('Catalyst::Test', 'TestApp');
-my $response = request('/test?view=Pkgconfig');
+my $response = request('/test?view=Appconfig');
ok($response->is_success, 'request ok');
is($response->content, TestApp->config->{default_message}, 'message ok');
Modified: trunk/Catalyst-View-Mason/t/globals.t
===================================================================
--- trunk/Catalyst-View-Mason/t/globals.t 2007-08-28 16:03:36 UTC (rev 6800)
+++ trunk/Catalyst-View-Mason/t/globals.t 2007-08-28 16:03:41 UTC (rev 6801)
@@ -9,14 +9,14 @@
use_ok('Catalyst::Test', 'TestApp');
-my $response = request('/globals');
+my $response = request('/globals?view=PkgConfig');
ok($response->is_success, 'request ok');
like($response->content, qr{\b c \s+ => \s+ TestApp \b}x, 'global c');
like($response->content, qr{\b base \s+ => \s+ http:// \b}x, 'global base');
like($response->content, qr{\b name \s+ => \s+ TestApp \b}x, 'global name');
-$response = request('/additional_globals');
+$response = request('/additional_globals?view=PkgConfig');
ok($response->is_success, 'request ok');
like($response->content, qr{\b c \s+ => \s+ TestApp \b}x, 'global c');
Modified: trunk/Catalyst-View-Mason/t/lib/TestApp/View/Mason/Extension.pm
===================================================================
--- trunk/Catalyst-View-Mason/t/lib/TestApp/View/Mason/Extension.pm 2007-08-28 16:03:36 UTC (rev 6800)
+++ trunk/Catalyst-View-Mason/t/lib/TestApp/View/Mason/Extension.pm 2007-08-28 16:03:41 UTC (rev 6801)
@@ -6,6 +6,7 @@
__PACKAGE__->config(
template_extension => '.mas',
+ use_match => 0,
);
1;
Modified: trunk/Catalyst-View-Mason/t/lib/TestApp.pm
===================================================================
--- trunk/Catalyst-View-Mason/t/lib/TestApp.pm 2007-08-28 16:03:36 UTC (rev 6800)
+++ trunk/Catalyst-View-Mason/t/lib/TestApp.pm 2007-08-28 16:03:41 UTC (rev 6801)
@@ -9,10 +9,11 @@
__PACKAGE__->config(
name => 'TestApp',
- default_view => 'Pkgconfig',
+ default_view => 'Appconfig',
default_message => 'hi',
'View::Mason::Appconfig' => {
default_escape_flags => ['h'],
+ use_match => 0,
},
);
@@ -20,6 +21,8 @@
__PACKAGE__->config(root => __PACKAGE__->config->{root}->stringify);
}
+__PACKAGE__->log( $::fake_log || Catalyst::Log->new(qw/debug info error fatal/) );
+
__PACKAGE__->setup;
sub test : Local {
More information about the Catalyst-commits
mailing list