Part 1 cleanup of ::Project.
[catagits/Gitalist.git] / t / 02git_project.t
index 8829731..9472a9e 100644 (file)
@@ -2,18 +2,19 @@ use strict;
 use warnings;
 use FindBin qw/$Bin/;
 use Test::More qw/no_plan/;
-
+use Test::Exception;
 use Data::Dumper;
 
 BEGIN { use_ok 'Gitalist::Git::Project' }
 
+dies_ok {
+    my $proj = Gitalist::Git::Project->new();
+} 'New project with no args';
+
 use Path::Class;
 my $gitdir = dir("$Bin/lib/repositories/repo1");
 
-my $proj = Gitalist::Git::Project->new(
-    path => $gitdir,
-    name => "repo1",
-);
+my $proj = Gitalist::Git::Project->new($gitdir);
 isa_ok($proj, 'Gitalist::Git::Project');
 is($proj->path, $gitdir, 'repository path is set');
 is($proj->name, qw/repo1/, 'repository name is set');