Sha256: 1dea82e80ac1adfeed0a26b95fd4b54c00599291f7689b90016ff5ef57bec027

Contents?: true

Size: 1.63 KB

Versions: 15

Compression:

Stored size: 1.63 KB

Contents

Given(/^there is an environment on the chef server named "(.*?)"$/) do |environment_name|
  ridley.environment.find(environment_name) || ridley.environment.create(name: environment_name)
end

Given(/^the environment "(.*?)" is locked$/) do |environment_name|
  step %Q[I run the "environment lock #{environment_name}" command]
end

Given(/^there is a file from input named "(.*?)"$/) do |file|
  expect(File.exists?(file)).to be_true
end

Given(/^there is not an environment on the chef server named "(.*?)"$/) do |environment_name|
  ridley.environment.find(environment_name).nil? || ridley.environment.delete(environment_name)
end

When(/^I destroy the environment "(.*?)"$/) do |environment_name|
  step %Q[I run the "environment destroy #{environment_name}" command interactively]
  step %q[I type "yes"]
end

When(/^I destroy the environment "(.*?)" with flags:$/) do |environment_name, table|
  flags_string = table.raw.flatten.join(' ')
  step %Q[I run the "environment destroy #{environment_name} #{flags_string}" command]
end

When(/^I create an environment from file "(.*?)"$/) do |file|
  real_file = File.join(File.dirname(__FILE__), "..", "..", file)
  step %Q[I run the "environment from #{real_file}" command]
end

When(/^I create an environment named "(.*?)"$/) do |name|
  step %Q[I run the "environment create #{name}" command]
end


Then(/^there should be an environment "(.*?)" on the chef server$/) do |environment_name|
  expect(ridley.environment.find(environment_name)).to_not be_nil
end

Then(/^there should not be an environment "(.*?)" on the chef server$/) do |environment_name|
  expect(ridley.environment.find(environment_name)).to be_nil
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
motherbrain-1.5.0 features/step_definitions/environment_steps.rb
motherbrain-1.4.0 features/step_definitions/environment_steps.rb
motherbrain-1.3.0 features/step_definitions/environment_steps.rb
motherbrain-1.2.1 features/step_definitions/environment_steps.rb
motherbrain-1.2.0 features/step_definitions/environment_steps.rb
motherbrain-1.1.3 features/step_definitions/environment_steps.rb
motherbrain-1.1.2 features/step_definitions/environment_steps.rb
motherbrain-1.1.1 features/step_definitions/environment_steps.rb
motherbrain-1.1.0 features/step_definitions/environment_steps.rb
motherbrain-1.0.0 features/step_definitions/environment_steps.rb
motherbrain-0.14.5 features/step_definitions/environment_steps.rb
motherbrain-0.14.4 features/step_definitions/environment_steps.rb
motherbrain-0.14.3 features/step_definitions/environment_steps.rb
motherbrain-0.14.2 features/step_definitions/environment_steps.rb
motherbrain-0.13.1 features/step_definitions/environment_steps.rb