Skip to content
Browse files

Merge branch 'master' of github.com:typester/ark-perl

  • Loading branch information...
2 parents 7aa75a2 + 933dccc commit 5f8df8320c500ebf415e80601b1b913c406eff4c @fujiwara fujiwara committed Sep 2, 2011
View
2 Makefile.PL
@@ -29,7 +29,7 @@ requires 'Devel::StackTrace';
requires 'Class::Method::Modifiers::Fast';
requires 'Exporter::AutoClean';
requires 'Object::Container' => '0.08';
-requires 'Path::AttrRouter';
+requires 'Path::AttrRouter' => '0.02';
requires 'MouseX::Foreign';
# build-in form generator/validator
View
22 t/action_path_root.t
@@ -0,0 +1,22 @@
+use Test::More;
+
+use FindBin;
+use lib "$FindBin::Bin/action_path_root/lib";
+
+use Ark::Test 'TestApp';
+
+{
+ my $res = request( GET => '/' );
+ ok $res, 'response ok';
+ is $res->code, '200', '200 ok';
+ is $res->content, 'root', 'root dispatch ok';
+}
+
+{
+ my $res = request( GET => '/foo' );
+ ok $res, 'response ok';
+ is $res->code, '200', '200 ok';
+ is $res->content, 'foo', 'foo dispatch ok';
+}
+
+done_testing;
View
4 t/action_path_root/lib/TestApp.pm
@@ -0,0 +1,4 @@
+package TestApp;
+use Ark;
+
+__PACKAGE__->meta->make_immutable;
View
9 t/action_path_root/lib/TestApp/Controller.pm
@@ -0,0 +1,9 @@
+package TestApp::Controller;
+use Ark 'Controller';
+
+sub index :Path {
+ my ($self, $c) = @_;
+ $c->res->body('root');
+}
+
+__PACKAGE__->meta->make_immutable;
View
9 t/action_path_root/lib/TestApp/Controller/Foo.pm
@@ -0,0 +1,9 @@
+package TestApp::Controller::Foo;
+use Ark 'Controller';
+
+sub index :Path {
+ my ($self, $c) = @_;
+ $c->res->body('foo');
+}
+
+__PACKAGE__->meta->make_immutable;

0 comments on commit 5f8df83

Please sign in to comment.
Something went wrong with that request. Please try again.