From 1e3d9a3136f19865f10bc8eccb1439bb90261c88 Mon Sep 17 00:00:00 2001 From: Chirag Jog Date: Thu, 16 May 2013 15:36:03 +0530 Subject: [PATCH] Move temporary certificate file creation into spec helper --- Rakefile | 1 - spec/spec_helper.rb | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index ab9cd17..bf93d85 100755 --- a/Rakefile +++ b/Rakefile @@ -24,7 +24,6 @@ require 'rspec/core' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = FileList['spec/unit/**/*_spec.rb'] - touch "AzureLinuxCert.pem" end RSpec::Core::RakeTask.new(:functional) do |spec| diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e7291c7..2eb91af 100755 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -15,6 +15,10 @@ require 'chef/knife/azure_server_create' require 'chef/knife/azure_server_describe' require 'chef/knife/azure_image_list' +require 'fileutils' +#Create an empty mock certificate file +FileUtils.touch('AzureLinuxCert.pem') + def tmpFile filename tmpdir = 'tmp' Dir::mkdir tmpdir unless FileTest::directory?(tmpdir)