Sha256: 73a2c7e4eaba29314b181b161aa97bf3d598fccb8378f91ce68c6a8fd0d818b5

Contents?: true

Size: 1.41 KB

Versions: 19

Compression:

Stored size: 1.41 KB

Contents

World(Berkshelf::RSpec::ChefAPI)

Given /^the Chef server does not have the cookbooks:$/ do |cookbooks|
  cookbooks.raw.each do |name, version|
    purge_cookbook(name, version)
  end
end

Given /^the Chef server has cookbooks:$/ do |cookbooks|
  cookbooks.raw.each do |name, version|
    purge_cookbook(name, version)
    cb_path = generate_cookbook(tmp_path, name, version)
    upload_cookbook(cb_path)
  end
end

Then /^the Chef server should have the cookbooks:$/ do |cookbooks|
  cookbooks.raw.each do |name, version|
    expect(server_has_cookbook?(name, version)).to be_true
  end
end

Then /^the Chef server should not have the cookbooks:$/ do |cookbooks|
  cookbooks.raw.each do |name, version|
    expect(server_has_cookbook?(name, version)).to be_false
  end
end

Given(/^I have an environment named "(.*?)"$/) do |environment_name|
  delete_environment(environment_name)
  begin
    create_environment(environment_name)
  rescue Ridley::Errors::HTTPConflict; end
end

Then(/^the version locks in "(.*?)" should be:$/) do |environment_name, version_locks|
  environment_cookbook_versions = environment(environment_name).cookbook_versions
  version_locks.hashes.each do |hash|
    expect(environment_cookbook_versions[hash['cookbook']]).to eq(hash['version_lock'])
  end
end

Given(/^I do not have an environment named "(.*?)"$/) do |environment_name|
  delete_environment(environment_name) if environment_exists? environment_name
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
berkshelf-2.0.18 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.17 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.16 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.15 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.14 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.13 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.12 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.11 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.10 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.9 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.8 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.7 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.6 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.5 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.4 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.3 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.1 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.0 features/step_definitions/chef_server_steps.rb
berkshelf-2.0.0.beta features/step_definitions/chef_server_steps.rb