lib/cucumber/chef/steps/ssh_steps.rb in cucumber-chef-2.1.0.rc.15 vs lib/cucumber/chef/steps/ssh_steps.rb in cucumber-chef-3.0.0.rc.0
- old
+ new
@@ -73,12 +73,12 @@
end
end
Then /^I should( not)? see the "([^\"]*)" of "([^\"]*)" in the output$/ do |boolean, key, name|
if (!boolean)
- @output.should =~ /#{$test_lab.containers.to_a[name][key.downcase.to_sym]}/i
+ @output.should =~ /#{Cucumber::Chef::Containers.all.select{|c| c.name == name}.first.send(key.downcase.to_sym)}/i
else
- @output.should_not =~ /#{$test_lab.containers.to_a[name][key.downcase.to_sym]}/i
+ @output.should_not =~ /#{Cucumber::Chef::Containers.all.select{|c| c.name == name}.first.send(key.downcase.to_sym)}/i
end
end
Then /^the exit code should be "([^\"]*)"$/ do |exit_code|
@exit_code.to_i.should == exit_code.to_i