From: Vincent Pit Date: Wed, 24 Feb 2010 19:16:36 +0000 (+0100) Subject: Set the 'git' option when we test for the 'root' X-Git-Tag: v0.07~1 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=d02d080e923caf7eafd646d39122c84d1e53178d;p=perl%2Fmodules%2Frgit.git Set the 'git' option when we test for the 'root' --- diff --git a/t/15-failures.t b/t/15-failures.t index cf6568b..ea9881b 100644 --- a/t/15-failures.t +++ b/t/15-failures.t @@ -14,14 +14,18 @@ local $SIG{__WARN__} = sub { die @_ }; my $res = eval { local $ENV{GIT_DIR}; - App::Rgit->new(); + App::Rgit->new( + git => 't/bin/git', + ); }; is $@, '', "App::Rgit->new(): no root, no GIT_DIR: doesn't croak"; isa_ok $res,'App::Rgit','App::Rgit->new(): no root, no GIT_DIR: returns object'; $res = eval { local $ENV{GIT_DIR} = Cwd::cwd; - App::Rgit->new(); + App::Rgit->new( + git => 't/bin/git', + ); }; is $@, '', "App::Rgit->new(): no root: doesn't croak"; isa_ok $res, 'App::Rgit', 'App::Rgit->new(): no root: returns object'; @@ -29,6 +33,7 @@ isa_ok $res, 'App::Rgit', 'App::Rgit->new(): no root: returns object'; $res = eval { App::Rgit->new( root => $0, + git => 't/bin/git', ); }; like $@, qr/Invalid root directory/, 'App::Rgit->new(): wrong root: croaks';