]> git.vpit.fr Git - perl/modules/rgit.git/blobdiff - t/20-each.t
Make the path to the git executable absolute in App::Rgit::Config->new
[perl/modules/rgit.git] / t / 20-each.t
index 41e679a633d0a07c73205b4650c9370bc472e4f8..aa978cdde111966ca713b40debb356d9a51fe2d9 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use Cwd                   qw/cwd abs_path/;
-use File::Spec::Functions qw/catdir catfile/;
+use File::Spec::Functions qw/curdir catdir catfile/;
 use File::Temp            qw/tempfile tempdir/;
 
 use Test::More;
@@ -124,12 +124,12 @@ sub try {
  my ($fh, $filename) = tempfile(UNLINK => 1);
 
  my $policy = App::Rgit::Policy->new(
-  @_ > 2 ? (name => 'Callback', callback => $_[2])
-         : (name => 'Default')
+  @_ > 2 ? (policy => 'Callback', callback => $_[2])
+         : (policy => 'Default')
  );
 
  my $ar = App::Rgit->new(
-  git    => abs_path('t/bin/git'),
+  git    => catfile(curdir, qw/t bin git/),
   root   => $tmpdir,
   cmd    => $cmd,
   args   => [ abs_path($filename), $cmd, qw/%n %g %w %b %G %W %B %R %%n %x/ ],