require 'cucumber'
require 'aruba/cucumber'

require 'rspec/expectations'

FIXTURES_PATH = File.expand_path(File.join(File.dirname(__FILE__),
                             "..",
                             "..",
                             "spec",
                             "fixtures"))

Before do
  @dirs = [FIXTURES_PATH]
end

After do
  %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))
  end
end

require 'cucumber'
require 'aruba/cucumber'

require 'rspec/expectations'

FIXTURES_PATH = File.expand_path(File.join(File.dirname(__FILE__),
                             "..",
                             "..",
                             "spec",
                             "fixtures"))

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
end


After do
  %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))
  end
end

Add creating of fixtures before scenarios
[Cucumber] Add creating of fixtures before scenarios

Signed-off-by: Daniel Schmidt <95584f82d85fd95b525d0d56fac4758a79f7199d@adytonsystems.com>
