Regenerated README and fixed tests for bootstrapped checkouts.
[catagits/Gitalist.git] / t / 02git_Repository.t
index 738c7f7..749ac12 100644 (file)
@@ -1,6 +1,13 @@
+use FindBin qw/$Bin/;
+BEGIN {
+    my $env = "$FindBin::Bin/../script/env";
+    if (-r $env) {
+        do $env or die $@;
+    }
+}
+
 use strict;
 use warnings;
-use FindBin qw/$Bin/;
 use Test::More qw/no_plan/;
 use Test::Exception;
 use Test::utf8;
@@ -25,15 +32,15 @@ BEGIN { use_ok 'Gitalist::Git::Repository' }
 
 dies_ok {
     my $proj = Gitalist::Git::Repository->new();
-} 'New project with no args';
+} 'New repository with no args';
 
 use Path::Class;
 my $gitdir = dir("$Bin/lib/repositories/repo1");
 
 my $proj = Gitalist::Git::Repository->new($gitdir);
 isa_ok($proj, 'Gitalist::Git::Repository');
-is($proj->path, $gitdir, 'project path is set');
-isa_ok($proj->path, 'Path::Class::Dir', 'project path');
+is($proj->path, $gitdir, 'repository path is set');
+isa_ok($proj->path, 'Path::Class::Dir', 'repository path');
 is($proj->name, qw/repo1/, 'repository name is set');
 is($proj->description, qq/some test repository/, 'repository description loaded');
 isa_ok($proj->last_change, 'DateTime', 'last_change');