features/support/env.rb in captain_hoog-1.0.2 vs features/support/env.rb in captain_hoog-1.1.0

- old
+ new

@@ -1,16 +1,18 @@ require 'cucumber' require 'aruba/cucumber' require 'rspec/expectations' -FIXTURES_PATH = File.expand_path(File.join(File.dirname(__FILE__), +SPEC_PATH = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", - "spec", - "fixtures")) + "spec")) +FIXTURES_PATH = File.join(SPEC_PATH, "fixtures") +HOOK_SPEC_PATH = File.join(SPEC_PATH, "hooks") + Before do $git_fixture_dir_exists ||= false @dirs = [FIXTURES_PATH] ["no_git", "with_git"].each do |dir| git_path = File.join(FIXTURES_PATH, dir) @@ -19,10 +21,13 @@ Dir.chdir(git_path) `git init .` end end $git_fixture_dir_exists = true + unless File.exists?(HOOK_SPEC_PATH) + FileUtils.mkdir(HOOK_SPEC_PATH) + end end After do FileUtils.rm_rf(File.join(FIXTURES_PATH, 'with_git', 'hoogfile.yml')) @@ -37,7 +42,8 @@ FileUtils.rm_rf(File.join(FIXTURES_PATH, "with_git", ".git", "hooks", hook_type)) + #FileUtils.rm_rf(HOOK_SPEC_PATH) end end