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