Permalink
Browse files

Fix Chef 11 expextations.

  • Loading branch information...
1 parent a43c885 commit 812a1c3d6efdbca9517384f0fcb892c0bd3e6714 @calavera calavera committed Mar 3, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 spec/minitest-chef-handler/lookup_spec.rb
@@ -22,7 +22,8 @@
describe "#used_recipe_names" do
before do
- stubs(:run_status => stub(:node => stub(:run_state => {})))
+ stubs(:run_status => stub(:node => stub(:run_state => {}),
+ :run_context => {}))
end
it "uses seen_recipes if run_state is not empty" do
@@ -31,8 +32,9 @@
end
it "uses run_list if run_state is empty" do
- run_status.node.stubs(:run_list => %w(recipe[foo] recipe[bar] role[someone]).map { |i| Chef::RunList::RunListItem.new(i) })
- used_recipe_names.must_equal ["foo", "bar"]
+ expected = %w(recipe[foo] recipe[bar] role[someone]).map { |i| Chef::RunList::RunListItem.new(i) }
+ run_status.run_context.stubs(:loaded_recipes => expected)
+ used_recipe_names.must_equal expected
end
end
end

0 comments on commit 812a1c3

Please sign in to comment.