Default ::Object attributes tree_sha1 and comment to '' when not present.
[catagits/Gitalist.git] / t / 02git_util.t
1 use strict;
2 use warnings;
3 use FindBin qw/$Bin/;
4 use Test::More;
5
6 use Data::Dumper;
7
8 BEGIN {
9     use_ok 'Gitalist::Git::Util';
10     use_ok 'Gitalist::Git::Project';
11 }
12
13 use Path::Class;
14 my $gitdir = dir("$Bin/lib/repositories/repo1");
15
16 my $proj = Gitalist::Git::Project->new(
17     path => $gitdir,
18     name => "repo1",
19 );
20 my $util = Gitalist::Git::Util->new(
21     project => $proj,
22 );
23 isa_ok($util, 'Gitalist::Git::Util');
24
25 like( $util->_git, qr#/git$#, 'git binary found');
26 isa_ok($util->_gpp, 'Git::PurePerl', 'gpp instance created');
27
28 done_testing;