X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frepositories-git.t;h=008224d94a4734b01043307e8e645a412550cb8e;hb=0c7501ff43ac490c870a8da0618ee0cffeb56a8f;hp=48521caa789a2ea05e16da75ffcecfbe9dc2a9dd;hpb=2ed8dcd3dca5d676454c52b38a6bb9c0f5ac6078;p=scpubgit%2FSystem-Introspector.git diff --git a/t/repositories-git.t b/t/repositories-git.t index 48521ca..008224d 100644 --- a/t/repositories-git.t +++ b/t/repositories-git.t @@ -2,7 +2,7 @@ use strictures 1; use Test::More; use File::Temp qw( tempdir ); -use System::Introspector::Repositories::Git; +use System::Introspector::Probe::Repositories::Git; plan skip_all => q{Tests require a git executable} unless `which git`; @@ -10,7 +10,7 @@ plan skip_all => q{Tests require a git executable} my $dir = tempdir(CLEANUP => 1); no warnings 'redefine'; -*System::Introspector::Repositories::Git::_open_locate_git_config_pipe = sub { +*System::Introspector::Probe::Repositories::Git::_open_locate_git_config_pipe = sub { my $output = "$dir/.git/config\n"; open my $fh, '<', \$output; return $fh; @@ -18,11 +18,14 @@ no warnings 'redefine'; system("GIT_DIR=$dir/.git git init > /dev/null"); -my $probe = System::Introspector::Repositories::Git->new( +my $probe = System::Introspector::Probe::Repositories::Git->new( root => "$dir", ); -my $data = $probe->gather; +my $result = $probe->gather; +ok $result, 'received data'; +my $data = $result->{git}; +ok $data, 'received git data'; is scalar(keys %$data), 1, 'found single git repository'; my $wc = $data->{ $dir };