From: Vincent Pit Date: Sun, 5 Oct 2008 22:34:48 +0000 (+0200) Subject: Test caching of repositories in App::Rgit::Config::Default X-Git-Tag: v0.02~1 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Frgit.git;a=commitdiff_plain;h=04036d6d8571dbd27c04fa83248577a065b9b761 Test caching of repositories in App::Rgit::Config::Default --- 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');