diff options
Diffstat (limited to 'spec/gitlab_custom_hook_spec.rb')
-rw-r--r-- | spec/gitlab_custom_hook_spec.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/spec/gitlab_custom_hook_spec.rb b/spec/gitlab_custom_hook_spec.rb index 05ec38b..faa4f2b 100644 --- a/spec/gitlab_custom_hook_spec.rb +++ b/spec/gitlab_custom_hook_spec.rb @@ -47,9 +47,7 @@ describe GitlabCustomHook do end def cleanup_hook_setup - FileUtils.rm_rf(File.join(tmp_repo_path, 'custom_hooks')) - FileUtils.rm_rf(File.join(tmp_repo_path, 'hooks')) - FileUtils.rm_rf(File.join(tmp_repo_path, 'hooks.d')) + FileUtils.rm_rf(File.join(tmp_repo_path)) FileUtils.rm_rf(File.join(tmp_root_path, 'hooks')) end @@ -66,16 +64,17 @@ describe GitlabCustomHook do before do cleanup_hook_setup + FileUtils.mkdir_p(File.join(tmp_repo_path, 'custom_hooks')) + FileUtils.mkdir_p(File.join(tmp_repo_path, 'custom_hooks', 'update.d')) + FileUtils.mkdir_p(File.join(tmp_repo_path, 'custom_hooks', 'pre-receive.d')) + FileUtils.mkdir_p(File.join(tmp_repo_path, 'custom_hooks', 'post-receive.d')) + FileUtils.mkdir_p(File.join(tmp_root_path, 'hooks')) FileUtils.mkdir_p(File.join(tmp_root_path, 'hooks', 'update.d')) FileUtils.mkdir_p(File.join(tmp_root_path, 'hooks', 'pre-receive.d')) FileUtils.mkdir_p(File.join(tmp_root_path, 'hooks', 'post-receive.d')) FileUtils.symlink(File.join(tmp_root_path, 'hooks'), File.join(tmp_repo_path, 'hooks')) - FileUtils.mkdir_p(File.join(tmp_repo_path, 'custom_hooks')) - FileUtils.mkdir_p(File.join(tmp_repo_path, 'custom_hooks', 'update.d')) - FileUtils.mkdir_p(File.join(tmp_repo_path, 'custom_hooks', 'pre-receive.d')) - FileUtils.mkdir_p(File.join(tmp_repo_path, 'custom_hooks', 'post-receive.d')) end after do |