]> git.vpit.fr Git - perl/modules/rgit.git/blobdiff - t/15-failures.t
Set the 'git' option when we test for the 'root'
[perl/modules/rgit.git] / t / 15-failures.t
index cf6568b871b5787ad0f4240d959a0866b86daba7..ea9881babb73b6fdd3eefe6c1c658e5c33462cdf 100644 (file)
@@ -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';