[Catalyst-commits] r6751 - in trunk/Catalyst-View-Mason/t: . lib
lib/TestApp/View/Mason lib/TestApp/root
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Tue Aug 28 16:58:25 GMT 2007
Author: rafl
Date: 2007-08-28 16:58:24 +0100 (Tue, 28 Aug 2007)
New Revision: 6751
Added:
trunk/Catalyst-View-Mason/t/exception.t
trunk/Catalyst-View-Mason/t/lib/TestApp/root/exception
Modified:
trunk/Catalyst-View-Mason/t/lib/TestApp.pm
trunk/Catalyst-View-Mason/t/lib/TestApp/View/Mason/Pkgconfig.pm
Log:
Add basic tests for mason exceptions.
Added: trunk/Catalyst-View-Mason/t/exception.t
===================================================================
--- trunk/Catalyst-View-Mason/t/exception.t (rev 0)
+++ trunk/Catalyst-View-Mason/t/exception.t 2007-08-28 15:58:24 UTC (rev 6751)
@@ -0,0 +1,14 @@
+#!perl
+
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use_ok('Catalyst::Test', 'TestApp');
+
+my $response = request('/exception?view=Pkgconfig');
+
+ok(!$response->is_success, 'request fails');
Modified: trunk/Catalyst-View-Mason/t/lib/TestApp/View/Mason/Pkgconfig.pm
===================================================================
--- trunk/Catalyst-View-Mason/t/lib/TestApp/View/Mason/Pkgconfig.pm 2007-08-28 15:58:17 UTC (rev 6750)
+++ trunk/Catalyst-View-Mason/t/lib/TestApp/View/Mason/Pkgconfig.pm 2007-08-28 15:58:24 UTC (rev 6751)
@@ -4,8 +4,4 @@
use warnings;
use base 'Catalyst::View::Mason';
-__PACKAGE__->config(
- comp_root => TestApp->path_to('root')->stringify,
-);
-
1;
Added: trunk/Catalyst-View-Mason/t/lib/TestApp/root/exception
===================================================================
--- trunk/Catalyst-View-Mason/t/lib/TestApp/root/exception (rev 0)
+++ trunk/Catalyst-View-Mason/t/lib/TestApp/root/exception 2007-08-28 15:58:24 UTC (rev 6751)
@@ -0,0 +1 @@
+<% $syntax_error!
Modified: trunk/Catalyst-View-Mason/t/lib/TestApp.pm
===================================================================
--- trunk/Catalyst-View-Mason/t/lib/TestApp.pm 2007-08-28 15:58:17 UTC (rev 6750)
+++ trunk/Catalyst-View-Mason/t/lib/TestApp.pm 2007-08-28 15:58:24 UTC (rev 6751)
@@ -23,6 +23,10 @@
$c->stash->{message} = ($c->request->param('message') || $c->config->{default_message});
}
+sub exception : Local {
+ my ($self, $c) = @_;
+}
+
sub end : Private {
my ($self, $c) = @_;
More information about the Catalyst-commits
mailing list