Sha256: ed96898a43ece972de9a9dd8a5b2c3e38e48bfd87d502cfcf0a906356f5274f4

Contents?: true

Size: 637 Bytes

Versions: 5

Compression:

Stored size: 637 Bytes

Contents

COOKBOOK_RESOLVERS = {
  'batali' => ['Batali', 'batali/chefspec'],
  'berkshelf' => ['Berksfile', 'chefspec/berkshelf'],
  'librarian' => ['Cheffile', 'chefspec/librarian']
}

require 'chefspec'

if ENV['COOKBOOK_RESOLVER']
  require COOKBOOK_RESOLVERS[ENV['COOKBOOK_RESOLVER']]
else
  resolver_lib = COOKBOOK_RESOLVERS.values.detect do |r_file, _r_lib|
    File.exist?(File.join(File.dirname(__FILE__), '..', '..', r_file))
  end
  fail 'Failed to locate valid cookbook resolver files!' unless resolver_lib
  puts "Resolving cookbooks from #{resolver_lib.first}"
  require resolver_lib.last
end

at_exit { ChefSpec::Coverage.report! }

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
from-scratch-0.7.0 cookbooks/postgresql/test/unit/spec_helper.rb
from-scratch-0.6.0 cookbooks/postgresql/test/unit/spec_helper.rb
from-scratch-0.5.0 cookbooks/postgresql/test/unit/spec_helper.rb
from-scratch-0.3.0 cookbooks/postgresql/test/unit/spec_helper.rb
from-scratch-0.2.0 cookbooks/postgresql/test/unit/spec_helper.rb