[Catalyst-commits] r6784 - in trunk/Catalyst-View-Mason/t: . lib
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Tue Aug 28 17:01:43 GMT 2007
Author: rafl
Date: 2007-08-28 17:01:43 +0100 (Tue, 28 Aug 2007)
New Revision: 6784
Added:
trunk/Catalyst-View-Mason/t/comp_root.t
Modified:
trunk/Catalyst-View-Mason/t/lib/TestApp.pm
Log:
Add tests to check if the comp_root detection works with Path::Class objects as well as with strings.
Added: trunk/Catalyst-View-Mason/t/comp_root.t
===================================================================
--- trunk/Catalyst-View-Mason/t/comp_root.t (rev 0)
+++ trunk/Catalyst-View-Mason/t/comp_root.t 2007-08-28 16:01:43 UTC (rev 6784)
@@ -0,0 +1,20 @@
+#!perl
+
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+{
+ no warnings 'once';
+ $::use_root_string = 1;
+}
+
+use_ok('Catalyst::Test', 'TestApp', 'foo');
+
+my $response = request('/test?view=Pkgconfig');
+
+ok($response->is_success, 'request ok');
+is($response->content, TestApp->config->{default_message}, 'message ok');
Modified: trunk/Catalyst-View-Mason/t/lib/TestApp.pm
===================================================================
--- trunk/Catalyst-View-Mason/t/lib/TestApp.pm 2007-08-28 16:01:33 UTC (rev 6783)
+++ trunk/Catalyst-View-Mason/t/lib/TestApp.pm 2007-08-28 16:01:43 UTC (rev 6784)
@@ -16,6 +16,10 @@
},
);
+if ($::use_root_string) {
+ __PACKAGE__->config(root => __PACKAGE__->config->{root}->stringify);
+}
+
__PACKAGE__->setup;
sub test : Local {
More information about the Catalyst-commits
mailing list