From: John Napiorkowski Date: Tue, 14 Apr 2015 19:56:42 +0000 (-0500) Subject: make this test lib like all the others X-Git-Tag: 5.90089_002~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=d5c890a4433058eb9fb0ac7f23cd264d38e6cff0 make this test lib like all the others --- diff --git a/t/inject_component_util.t b/t/inject_component_util.t index c757d9c..7162202 100644 --- a/t/inject_component_util.t +++ b/t/inject_component_util.t @@ -2,7 +2,9 @@ use strict; use warnings; use Test::More; use Catalyst::Utils; - +use FindBin; +use lib "$FindBin::Bin/lib"; + BEGIN { package Model::Banana; @@ -20,9 +22,9 @@ use Catalyst; after 'setup_components' => sub { my $self = shift; Catalyst::Utils::inject_component( into => __PACKAGE__, component => 'Model::Banana' ); - Catalyst::Utils::inject_component( into => __PACKAGE__, component => 't::Test::Apple' ); + Catalyst::Utils::inject_component( into => __PACKAGE__, component => 'Test::Apple' ); Catalyst::Utils::inject_component( into => __PACKAGE__, component => 'Model::Banana', as => 'Cherry' ); - Catalyst::Utils::inject_component( into => __PACKAGE__, component => 't::Test::Apple', as => 'Apple' ); + Catalyst::Utils::inject_component( into => __PACKAGE__, component => 'Test::Apple', as => 'Apple' ); }; TestCatalyst->config( 'home' => '.' ); @@ -35,7 +37,7 @@ package main; use Catalyst::Test qw/TestCatalyst/; -ok( TestCatalyst->controller( $_ ) ) for qw/ Apple t::Test::Apple /; +ok( TestCatalyst->controller( $_ ) ) for qw/ Apple Test::Apple /; ok( TestCatalyst->model( $_ ) ) for qw/ Banana Cherry /; done_testing; diff --git a/t/lib/Test/Apple.pm b/t/lib/Test/Apple.pm new file mode 100644 index 0000000..98b4df1 --- /dev/null +++ b/t/lib/Test/Apple.pm @@ -0,0 +1,14 @@ +package Test::Apple; + +use strict; +use warnings; + +use parent qw/Catalyst::Controller/; + +sub default :Path { +} + +sub apple :Local { +} + +1;