[Catalyst-commits] r13190 - Catalyst-Runtime/5.80/trunk/t/aggregate

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Wed Apr 28 22:54:04 GMT 2010


Author: rafl
Date: 2010-04-28 23:54:04 +0100 (Wed, 28 Apr 2010)
New Revision: 13190

Modified:
   Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_path_to.t
Log:
Make sure path_to returns an instance of the right Path::Class class.

Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_path_to.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_path_to.t	2010-04-28 22:31:48 UTC (rev 13189)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_path_to.t	2010-04-28 22:54:04 UTC (rev 13190)
@@ -2,6 +2,9 @@
 use warnings;
 
 use Test::More;
+use FindBin;
+use Path::Class;
+use File::Basename;
 
 my %non_unix = (
     MacOS   => 1,
@@ -16,17 +19,20 @@
 
 my $os = $non_unix{$^O} ? $^O : 'Unix';
 
-if(  $os ne 'Unix' ) {
+if ( $os ne 'Unix' ) {
     plan skip_all => 'tests require Unix';
 }
-else {
-    plan tests => 3;
-}
 
 use_ok('Catalyst');
 
 my $context = 'Catalyst';
 
+$context->setup_home;
+my $base = dir($FindBin::Bin)->relative->stringify;
+
+isa_ok( Catalyst::path_to( $context, $base ), 'Path::Class::Dir' );
+isa_ok( Catalyst::path_to( $context, $base, basename $0 ), 'Path::Class::File' );
+
 my $config = Catalyst->config;
 
 $config->{home} = '/home/sri/my-app/';
@@ -37,3 +43,5 @@
 
 is( Catalyst::path_to( $context, 'foo', 'bar' ),
     '/Users/sri/myapp/foo/bar', 'deep Unix path' );
+
+done_testing;




More information about the Catalyst-commits mailing list