X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F15-failures.t;h=19b3995f3169a48a71b272bd4226454e70129e0f;hb=04036d6d8571dbd27c04fa83248577a065b9b761;hp=82f1409cc9ad19257ef53b1c3438671bb82b821f;hpb=eb3cdeba8301dba3e0444658b97c24e3a73fad84;p=perl%2Fmodules%2Frgit.git diff --git a/t/15-failures.t b/t/15-failures.t index 82f1409..19b3995 100644 --- a/t/15-failures.t +++ b/t/15-failures.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 34; +use Test::More tests => 38; use App::Rgit; @@ -85,3 +85,15 @@ is($res, 'App::Rgit::Test::Pub', 'App::Rgit::Command->action("beer" => "App::Rgi $res = eval { App::Rgit::Command->action('beer') }; is($@, '', 'App::Rgit::Command->action("beer"): does not croak'); is($res, 'App::Rgit::Test::Pub', 'App::Rgit::Command->action("beer"): returns valid answer'); + +use App::Rgit::Config; + +my $arc = App::Rgit::Config->new(root => 't', git => 't/bin/git'); + +$res = eval { $arc->repos }; +is($@, '', '$arc->repos: does not croak'); +is_deeply($res, [ ], '$arc->repos: found nothing'); + +$res = eval { $arc->repos }; +is($@, '', '$arc->repos: does not croak'); +is_deeply($res, [ ], '$arc->repos: cached ok');