summaryrefslogtreecommitdiff
path: root/spec/unit/audit/control_group_data_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/audit/control_group_data_spec.rb')
-rw-r--r--spec/unit/audit/control_group_data_spec.rb33
1 files changed, 19 insertions, 14 deletions
diff --git a/spec/unit/audit/control_group_data_spec.rb b/spec/unit/audit/control_group_data_spec.rb
index a7c8850350..ea4ac260f9 100644
--- a/spec/unit/audit/control_group_data_spec.rb
+++ b/spec/unit/audit/control_group_data_spec.rb
@@ -122,9 +122,10 @@ describe Chef::Audit::ControlData do
let(:context) { nil }
let(:line_number) { 27 }
- let(:control_data) { described_class.new(name: name,
- resource_type: resource_type, resource_name: resource_name,
- context: context, line_number: line_number) }
+ let(:control_data) do
+ described_class.new(name: name,
+ resource_type: resource_type, resource_name: resource_name,
+ context: context, line_number: line_number) end
describe "#to_hash" do
@@ -171,7 +172,7 @@ describe Chef::Audit::ControlGroupData do
let(:context) { nil }
let(:line_number) { 0 }
- let(:control_data) {
+ let(:control_data) do
{
:name => name,
:resource_type => resource_type,
@@ -179,16 +180,17 @@ describe Chef::Audit::ControlGroupData do
:context => context,
:line_number => line_number,
}
- }
+ end
end
shared_context "control" do
include_context "control data"
- let(:control) { Chef::Audit::ControlData.new(name: name,
- resource_type: resource_type, resource_name: resource_name,
- context: context, line_number: line_number) }
+ let(:control) do
+ Chef::Audit::ControlData.new(name: name,
+ resource_type: resource_type, resource_name: resource_name,
+ context: context, line_number: line_number) end
before do
allow(Chef::Audit::ControlData).to receive(:new).
@@ -436,15 +438,18 @@ describe Chef::Audit::ControlGroupData do
let(:control_hash_2) { { :line_number => 13 } }
let(:control_hash_3) { { :line_number => 35 } }
- let(:control_1) { double("control 1",
+ let(:control_1) do
+ double("control 1",
:line_number => control_hash_1[:line_number],
- :to_hash => control_hash_1) }
- let(:control_2) { double("control 2",
+ :to_hash => control_hash_1) end
+ let(:control_2) do
+ double("control 2",
:line_number => control_hash_2[:line_number],
- :to_hash => control_hash_2) }
- let(:control_3) { double("control 3",
+ :to_hash => control_hash_2) end
+ let(:control_3) do
+ double("control 3",
:line_number => control_hash_3[:line_number],
- :to_hash => control_hash_3) }
+ :to_hash => control_hash_3) end
let(:control_list) { [control_1, control_2, control_3] }
let(:ordered_control_hashes) { [control_hash_2, control_hash_1, control_hash_3] }