Sha256: ea883b2d957f612f5c6fecb2cf9aa81d49023e3354cd56662442a0f3cdba6bfc

Contents?: true

Size: 986 Bytes

Versions: 2

Compression:

Stored size: 986 Bytes

Contents

require 'chefspec'
require 'chefspec/berkshelf'

RSpec.configure do |config|
  config.color = true
  config.log_level = :fatal # ignore warnings
  config.alias_example_group_to :describe_recipe, type: :recipe
  config.alias_example_group_to :describe_resource, type: :resource
  config.alias_example_group_to :describe_attribute, type: :attribute

  config.filter_run :focus
  config.run_all_when_everything_filtered = true

  Kernel.srand config.seed
  config.order = :random

  config.default_formatter = 'doc' if config.files_to_run.one?

  config.expect_with :rspec do |expectations|
    expectations.syntax = :expect
  end

  config.mock_with :rspec do |mocks|
    mocks.syntax = :expect
    mocks.verify_partial_doubles = true
  end
end

RSpec.shared_context 'recipe tests', type: :recipe do
  let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '12.04').converge(described_recipe) }
end

at_exit { ChefSpec::Coverage.report! }

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chef-12.8.1 acceptance/top-cookbooks/test_run/git/spec/spec_helper.rb
chef-12.8.1-universal-mingw32 acceptance/top-cookbooks/test_run/git/spec/spec_helper.rb