summaryrefslogtreecommitdiff
path: root/spec/unit/audit
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2015-01-14 11:40:48 -0800
committerClaire McQuin <claire@getchef.com>2015-01-15 15:34:33 -0800
commit4cbc6274889ddedf105ec99200f53b50439df273 (patch)
treee42d111f7f20f45377f0dbbdeb4e5ef377c9c9f0 /spec/unit/audit
parentd1a70027b68b1ba6d36eea3bc38d5441a61f22f8 (diff)
downloadchef-mcquin/control_group.tar.gz
Update DSL method name to controls_group.mcquin/control_group
Update to use control_group. Unify wording along control_group. Unify wording along control_group. Fix typo. Enable audit mode. Update to use control_group syntax. Update for audit DSL changes. Update for audit DSL change.
Diffstat (limited to 'spec/unit/audit')
-rw-r--r--spec/unit/audit/audit_event_proxy_spec.rb4
-rw-r--r--spec/unit/audit/runner_spec.rb8
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/audit/audit_event_proxy_spec.rb b/spec/unit/audit/audit_event_proxy_spec.rb
index 899ba468b1..17a5d3d771 100644
--- a/spec/unit/audit/audit_event_proxy_spec.rb
+++ b/spec/unit/audit/audit_event_proxy_spec.rb
@@ -44,7 +44,7 @@ describe Chef::Audit::AuditEventProxy do
it "notifies control_group_started event" do
expect(Chef::Log).to receive(:debug).
- with("Entered \`controls\` block named poots")
+ with("Entered \`control_group\` block named poots")
expect(events).to receive(:control_group_started).
with(description)
audit_event_proxy.example_group_started(notification)
@@ -76,7 +76,7 @@ describe Chef::Audit::AuditEventProxy do
end
it "sends a message that audits completed" do
- expect(Chef::Log).to receive(:info).with("Successfully executed all \`controls\` blocks and contained examples")
+ expect(Chef::Log).to receive(:info).with("Successfully executed all \`control_group\` blocks and contained examples")
audit_event_proxy.stop(notification)
end
diff --git a/spec/unit/audit/runner_spec.rb b/spec/unit/audit/runner_spec.rb
index 67590fecf9..250c93b24d 100644
--- a/spec/unit/audit/runner_spec.rb
+++ b/spec/unit/audit/runner_spec.rb
@@ -76,14 +76,14 @@ describe Chef::Audit::Runner do
end
end
- describe "#register_controls" do
+ describe "#register_control_groups" do
let(:audits) { [] }
let(:run_context) { instance_double(Chef::RunContext, :audits => audits) }
it "adds the control group aliases" do
- runner.send(:register_controls)
+ runner.send(:register_control_groups)
- expect(RSpec::Core::DSL.example_group_aliases).to include(:__controls__)
+ expect(RSpec::Core::DSL.example_group_aliases).to include(:__control_group__)
expect(RSpec::Core::DSL.example_group_aliases).to include(:control)
end
@@ -92,7 +92,7 @@ describe Chef::Audit::Runner do
let(:group) {Struct.new(:args, :block).new(["group_name"], nil)}
it "sends the audits to the world" do
- runner.send(:register_controls)
+ runner.send(:register_control_groups)
expect(RSpec.world.example_groups.size).to eq(1)
# For whatever reason, `kind_of` is not working