use Path::Class;
use Gitalist::Git::Project;
my $project = Gitalist::Git::Project->new(
+ name => 'repo1',
path => dir("$Bin/../lib/repositories/repo1"),
);
is($object->file, 'dir1', 'file is correct');
is($object->mode, 16384, 'mode is correct');
is($object->modestr, 'd---------', "modestr is correct" );
+is($object->size, 33, "size is correct");
# Create object from hash.
my $obj2 = Gitalist::Git::Object->new(
is($obj2->mode, 33188, 'mode is correct');
is($obj2->modestr, '-rw-r--r--', "modestr is correct" );
is($obj2->contents, "bar\n", 'obj2 contents is correct');
-
+is($obj2->size, 4, "size is correct");