summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-11-21 10:25:28 -0800
committerClaire McQuin <claire@getchef.com>2014-11-21 10:25:28 -0800
commit4a395906725bd96b5985d8f2e2f6627f467d0a20 (patch)
tree0a26a83736b79c69a6522af5241ed32346fe8f85
parentd62f95da60e8839a6d6706a7d117457ceb0a735c (diff)
downloadchef-4a395906725bd96b5985d8f2e2f6627f467d0a20.tar.gz
Add recipes to test include_recipe, multiple controls blocks
-rw-r--r--kitchen-tests/cookbooks/audit_test/recipes/default.rb6
-rw-r--r--kitchen-tests/cookbooks/audit_test/recipes/include_recipe.rb10
-rw-r--r--kitchen-tests/cookbooks/audit_test/recipes/multiple_controls.rb17
3 files changed, 23 insertions, 10 deletions
diff --git a/kitchen-tests/cookbooks/audit_test/recipes/default.rb b/kitchen-tests/cookbooks/audit_test/recipes/default.rb
index 848e085125..f02f24c2c9 100644
--- a/kitchen-tests/cookbooks/audit_test/recipes/default.rb
+++ b/kitchen-tests/cookbooks/audit_test/recipes/default.rb
@@ -5,9 +5,7 @@
# Copyright (c) 2014 The Authors, All Rights Reserved.
controls "basic control" do
- control "math" do
- it "should pass" do
- expect(2 - 2).to eq(0)
- end
+ it "should pass" do
+ expect(2 - 2).to eq(0)
end
end
diff --git a/kitchen-tests/cookbooks/audit_test/recipes/include_recipe.rb b/kitchen-tests/cookbooks/audit_test/recipes/include_recipe.rb
index 2ead0722e1..00bdd9c9e9 100644
--- a/kitchen-tests/cookbooks/audit_test/recipes/include_recipe.rb
+++ b/kitchen-tests/cookbooks/audit_test/recipes/include_recipe.rb
@@ -7,11 +7,9 @@
include_recipe "audit_test::default"
controls "another basic control" do
- control "math" do
- it "should also pass" do
- arr = [0, 0]
- arr.delete(0)
- expect( arr ).to be_empty
- end
+ it "should also pass" do
+ arr = [0, 0]
+ arr.delete(0)
+ expect( arr ).to be_empty
end
end
diff --git a/kitchen-tests/cookbooks/audit_test/recipes/multiple_controls.rb b/kitchen-tests/cookbooks/audit_test/recipes/multiple_controls.rb
new file mode 100644
index 0000000000..decb3f354b
--- /dev/null
+++ b/kitchen-tests/cookbooks/audit_test/recipes/multiple_controls.rb
@@ -0,0 +1,17 @@
+#
+# Cookbook Name:: audit_test
+# Recipe:: multiple_controls
+#
+# Copyright (c) 2014 The Authors, All Rights Reserved.
+
+controls "first control" do
+ it "should pass" do
+ expect(2 - 2).to eq(0)
+ end
+end
+
+controls "second control" do
+ it "should pass" do
+ expect(2 - 2).to eq(0)
+ end
+end