6 use Test::More qw/no_plan/;
9 use File::Temp qw/tempdir/;
11 BEGIN { use_ok( 'Oyster::Deploy::Git' ); }
13 my $tmpdir = tempdir();
15 my $deploy = new_ok 'Oyster::Deploy::Git';
18 is($deploy->create("${tmpdir}/testapp"), 1, 'Create returned okay');
20 ok((-d "${tmpdir}/testapp"), "App directory created");
22 throws_ok(sub {$deploy->create("${tmpdir}/testapp")}, 'Error::Simple', "Directory already exists");
23 ok((-f "${tmpdir}/testapp/.git/hooks/post-receive"), "Post reveive hook exists");
24 ok((-f "${tmpdir}/testapp/.git/hooks/post-update"), "Post update hook exists");