features/support/env.rb in berkshelf-1.0.0.rc3 vs features/support/env.rb in berkshelf-1.0.0

- old
+ new

@@ -11,14 +11,27 @@ APP_ROOT = File.expand_path('../../../', __FILE__) ENV["BERKSHELF_PATH"] = File.join(APP_ROOT, "tmp", "berkshelf") ENV["BERKSHELF_CHEF_CONFIG"] = File.join(APP_ROOT, "tmp", "knife.rb") + + # Workaround for RSA Fingerprint prompt in Travis CI + git_ssh_path = '/tmp/git_ssh.sh' + unless File.exist? git_ssh_path + git_ssh = File.new(git_ssh_path, 'w+') + git_ssh.puts "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $1 $2" + git_ssh.chmod 0775 + git_ssh.flush + git_ssh.close + end + ENV["GIT_SSH"] = git_ssh_path + + Dir[File.join(APP_ROOT, "spec/support/**/*.rb")].each {|f| require f} Around do |scenario, block| - VCR.use_cassette(scenario.title) do + VCR.use_cassette(scenario.name) do block.call end end Before do