summaryrefslogtreecommitdiff
path: root/spec/support/shared/integration/integration_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared/integration/integration_helper.rb')
-rw-r--r--spec/support/shared/integration/integration_helper.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/support/shared/integration/integration_helper.rb b/spec/support/shared/integration/integration_helper.rb
index 7d62a698d8..a19c9b35e7 100644
--- a/spec/support/shared/integration/integration_helper.rb
+++ b/spec/support/shared/integration/integration_helper.rb
@@ -17,15 +17,15 @@
# limitations under the License.
#
-require 'tmpdir'
-require 'fileutils'
-require 'chef/config'
-require 'chef/json_compat'
-require 'chef/server_api'
-require 'support/shared/integration/knife_support'
-require 'support/shared/integration/app_server_support'
-require 'cheffish/rspec/chef_run_support'
-require 'spec_helper'
+require "tmpdir"
+require "fileutils"
+require "chef/config"
+require "chef/json_compat"
+require "chef/server_api"
+require "support/shared/integration/knife_support"
+require "support/shared/integration/app_server_support"
+require "cheffish/rspec/chef_run_support"
+require "spec_helper"
module Cheffish
class BasicChefClient
@@ -75,8 +75,8 @@ module IntegrationSupport
def file(relative_path, contents)
filename = path_to(relative_path)
dir = File.dirname(filename)
- FileUtils.mkdir_p(dir) unless dir == '.'
- File.open(filename, 'w') do |file|
+ FileUtils.mkdir_p(dir) unless dir == "."
+ File.open(filename, "w") do |file|
raw = case contents
when Hash, Array
Chef::JSONCompat.to_json_pretty(contents)
@@ -90,7 +90,7 @@ module IntegrationSupport
def symlink(relative_path, relative_dest)
filename = path_to(relative_path)
dir = File.dirname(filename)
- FileUtils.mkdir_p(dir) unless dir == '.'
+ FileUtils.mkdir_p(dir) unless dir == "."
dest_filename = path_to(relative_dest)
File.symlink(dest_filename, filename)
end
@@ -111,7 +111,7 @@ module IntegrationSupport
RSpec.shared_context "with a chef repo" do
before :each do
raise "Can only create one directory per test" if @repository_dir
- @repository_dir = Dir.mktmpdir('chef_repo')
+ @repository_dir = Dir.mktmpdir("chef_repo")
Chef::Config.chef_repo_path = @repository_dir
%w(client cookbook data_bag environment node role user).each do |object_name|
Chef::Config.delete("#{object_name}_path".to_sym)
@@ -140,7 +140,7 @@ module IntegrationSupport
# Versioned cookbooks
- RSpec.shared_context 'with versioned cookbooks', :versioned_cookbooks => true do
+ RSpec.shared_context "with versioned cookbooks", :versioned_cookbooks => true do
before(:each) { Chef::Config[:versioned_cookbooks] = true }
after(:each) { Chef::Config.delete(:versioned_cookbooks) }
end