summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-10-29 13:27:27 -0700
committertyler-ball <tyleraball@gmail.com>2014-10-29 13:27:27 -0700
commit51ea3cb190bcfa7c7f8e498cfcc9d1197a294332 (patch)
tree138b6993975588272c969e544048faaf4e4bbc19
parent4126f112615e544be832d9a7b39a61f7641813a2 (diff)
downloadchef-51ea3cb190bcfa7c7f8e498cfcc9d1197a294332.tar.gz
Renaming DSL methods to match the spec
-rw-r--r--lib/chef/dsl/audit.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/chef/dsl/audit.rb b/lib/chef/dsl/audit.rb
index a90f7f66e0..24c1bb0464 100644
--- a/lib/chef/dsl/audit.rb
+++ b/lib/chef/dsl/audit.rb
@@ -21,11 +21,11 @@ class Chef
module DSL
module Audit
- # List of `controls` example groups to be executed
+ # List of `control` example groups to be executed
@example_groups = nil
- # Adds the control_group and block (containing controls to execute) to the runner's list of pending examples
- def control_group(group_name, &group_block)
+ # Adds the controls group and block (containing controls to execute) to the runner's list of pending examples
+ def controls(group_name, &group_block)
puts "entered group named #{group_name}"
@example_groups = []
@@ -36,14 +36,15 @@ class Chef
# TODO add the @example_groups list to the runner for later execution
p @example_groups
- # Reset this to nil so we can tell if a `controls` message is sent outside a `control_group` block
- # Prevents defining then un-defining the `controls` singleton method
+ # Reset this to nil so we can tell if a `control` message is sent outside a `controls` block
+ # Prevents defining then un-defining the `control` singleton method
+ # TODO this does not prevent calling `control` inside `control`
@example_groups = nil
end
- def controls(*args, &control_block)
+ def control(*args, &control_block)
if @example_groups.nil?
- raise "Cannot define a `controls` unless inside a `control_group`"
+ raise "Cannot define a `control` unless inside a `controls` block"
end
example_name = args[0]