Permalink
Browse files

checking working directory in tests

  • Loading branch information...
1 parent fe3094e commit a31bc8a126bab4b6661f21bd2be24ad85a8ad1bf Zbigniew Lukasiak committed Mar 4, 2011
Showing with 17 additions and 7 deletions.
  1. +7 −4 Changes
  2. +1 −1 dist.ini
  3. +9 −2 t/main.t
View
11 Changes
@@ -6,9 +6,12 @@ Revision history for Plack::Middleware::Auth::Form.
0.002 2011-02-27
No "use feature ':5.10'".
-0.004 2011-02-27
- Minor doc fix.
-
-{{$NEXT}}
+0.005 2011-03-01
File::Spec to get the app.psgi file in tests.
+0.006 2011-03-01
+ Docs improvements
+
+{{$NEXT}}
+ Checking working directory
+
View
@@ -3,7 +3,7 @@ author = Zbigniew Lukasiak <zby@cpan.org>
license = Artistic_2_0
copyright_holder = Zbigniew Lukasiak <zby@cpan.org>
copyright_year = 2011
-version = 0.006
+version = 0.007
[@Basic]
[AutoPrereqs]
View
@@ -3,9 +3,16 @@ use warnings;
use Test::More;
use Test::WWW::Mechanize::PSGI;
-use File::Spec;
+use Cwd 'getcwd';
-my $psgi_file = File::Spec->catfile( 't', 'app.psgi' );
+if( -d 't' ){
+ chdir 't';
+}
+else{
+ warn 'I am in: ' . getcwd();
+}
+
+my $psgi_file = 'app.psgi';
my $app = do $psgi_file || die $! ? "Cannot find '$psgi_file': $!" : "Cannot compile '$psgi_file': $@";
my $mech = Test::WWW::Mechanize::PSGI->new( app => $app );

0 comments on commit a31bc8a

Please sign in to comment.