X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02git_Repository.t;h=749ac120e120341a9d80e4a32cdea059dcca58b9;hb=0556ab269dff444de064d2ef8d484b948435ff6a;hp=738c7f7bc867115ce3bbb12533e55323263d8fd7;hpb=44a9ed75e5d936e96ce63cfb13c943ab3f59dc52;p=catagits%2FGitalist.git diff --git a/t/02git_Repository.t b/t/02git_Repository.t index 738c7f7..749ac12 100644 --- a/t/02git_Repository.t +++ b/t/02git_Repository.t @@ -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');