fixed tests to expect __error__ instead of error mark
[scpubgit/System-Introspector.git] / t / repositories-git.t
index 48521ca..008224d 100644 (file)
@@ -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 };