That mostly fixes my fail, it being required to start with would have made things...
Tomas Doran (t0m) [Sun, 1 Nov 2009 18:38:08 +0000 (18:38 +0000)]
lib/Gitalist/Model/Git.pm
t/model_Git.t

index e233e7c..5c8d69c 100644 (file)
@@ -57,7 +57,7 @@ use Git::PurePerl;
 our $SHA1RE = qr/[0-9a-fA-F]{40}/;
 
 # These are static and only need to be setup on app start.
-has repo_dir => ( isa => NonEmptySimpleStr, is => 'ro' ); # Fixme - path::class
+has repo_dir => ( isa => NonEmptySimpleStr, is => 'ro', required => 1 ); # Fixme - path::class
 has git      => ( isa => NonEmptySimpleStr, is => 'ro', lazy_build => 1 );
 # These are dynamic and can be different from one request to the next.
 has project  => ( isa => NonEmptySimpleStr, is => 'rw');
index 2ab9c8f..cc195c9 100644 (file)
@@ -5,8 +5,7 @@ use Test::More;
 
 BEGIN { use_ok 'Gitalist::Model::Git' }
 
-my $c = bless {}, 'Gitalist';
-my $m = Git::Repos->new($c, { repo_dir => "$Bin/lib/repositories" });
+my $m = Git::Repos->new({ repo_dir => "$Bin/lib/repositories" });
 isa_ok($m, 'Git::Repos');
 
 # 'bare.git' is a bare git repository in the repository dir