Sha256: 4a79a074da43118bbaacffe22860ff1d959ab183b8dc39a7631de962ad2d4c50
Contents?: true
Size: 1.21 KB
Versions: 1
Compression:
Stored size: 1.21 KB
Contents
require 'cucumber' require 'aruba/cucumber' require 'rspec/expectations' SPEC_PATH = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "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) FileUtils.mkdir_p(git_path) if dir.eql?("with_git") 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')) %w{ pre-commit pre-push pre-rebase post-update commit-msg applypatch-msg post-update pre-applypatch }.each do |hook_type| FileUtils.rm_rf(File.join(FIXTURES_PATH, "with_git", ".git", "hooks", hook_type)) FileUtils.rm_rf(HOOK_SPEC_PATH) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
captain_hoog-1.1.1 | features/support/env.rb |