Skip to content

Commit 8c7e2f8

Browse files
Thom MaySeth Falcon
authored andcommitted
test that run_list handles versions correctly
1 parent 2b31e77 commit 8c7e2f8

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

chef/spec/unit/run_list_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,22 @@
4949
@run_list.run_list.length.should == 1
5050
@run_list.recipes.length.should == 1
5151
end
52+
53+
it "should allow two versions of a recipe" do
54+
@run_list << "recipe[needy,0.2.0]"
55+
@run_list << "recipe[needy,0.1.0]"
56+
@run_list.run_list.length.should == 2
57+
@run_list.recipes.length.should == 2
58+
@run_list.recipes.include?('needy').should == true
59+
end
60+
61+
62+
it "should not allow duplicate versions of a recipe" do
63+
@run_list << "recipe[needy,0.2.0]"
64+
@run_list << "recipe[needy,0.2.0]"
65+
@run_list.run_list.length.should == 1
66+
@run_list.recipes.length.should == 1
67+
end
5268
end
5369

5470
describe "==" do

0 commit comments

Comments
 (0)