spec/spec_helper.rb in berkshelf-5.5.0 vs spec/spec_helper.rb in berkshelf-5.6.0

- old
+ new

@@ -1,20 +1,20 @@ -require 'spork' +require "spork" def windows? !!(RUBY_PLATFORM =~ /mswin|mingw|windows/) end BERKS_SPEC_DATA = File.expand_path("../data", __FILE__) Spork.prefork do - require 'rspec' - require 'cleanroom/rspec' - require 'webmock/rspec' - require 'berkshelf/api/rspec' unless windows? + require "rspec" + require "cleanroom/rspec" + require "webmock/rspec" + require "berkshelf/api/rspec" unless windows? - Dir['spec/support/**/*.rb'].each { |f| require File.expand_path(f) } + Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) } RSpec.configure do |config| config.include Berkshelf::RSpec::FileSystemMatchers config.include Berkshelf::RSpec::ChefAPI config.include Berkshelf::RSpec::ChefServer @@ -42,11 +42,11 @@ Berkshelf::RSpec::ChefServer.start Berkshelf::API::RSpec::Server.start unless windows? end config.before(:all) do - ENV['BERKSHELF_PATH'] = berkshelf_path.to_s + ENV["BERKSHELF_PATH"] = berkshelf_path.to_s end config.before(:each) do Berkshelf::API::RSpec::Server.clear_cache unless windows? clean_tmp_path @@ -69,19 +69,19 @@ result end end Spork.each_run do - require 'berkshelf' + require "berkshelf" module Berkshelf class GitLocation include Berkshelf::RSpec::Git alias :real_clone :clone def clone fake_remote = generate_fake_git_remote(uri, tags: @branch ? [@branch] : []) - tmp_clone = File.join(self.class.tmpdir, uri.gsub(/[\/:]/,'-')) + tmp_clone = File.join(self.class.tmpdir, uri.gsub(/[\/:]/, "-")) @uri = "file://#{fake_remote}" real_clone end end end