summaryrefslogtreecommitdiff
path: root/spec/unit/audit/audit_reporter_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
commit686113531d23f30e9973d659c456ae33eb9cff1f (patch)
treef225de7251a8b49b8d183dd168bab0a0addbe23f /spec/unit/audit/audit_reporter_spec.rb
parentd1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff)
downloadchef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
Diffstat (limited to 'spec/unit/audit/audit_reporter_spec.rb')
-rw-r--r--spec/unit/audit/audit_reporter_spec.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/unit/audit/audit_reporter_spec.rb b/spec/unit/audit/audit_reporter_spec.rb
index 28f2f2db45..ed0aa622cc 100644
--- a/spec/unit/audit/audit_reporter_spec.rb
+++ b/spec/unit/audit/audit_reporter_spec.rb
@@ -29,7 +29,7 @@ describe Chef::Audit::AuditReporter do
let(:start_time) { Time.new(2014, 12, 3, 9, 31, 05, "-08:00") }
let(:end_time) { Time.new(2014, 12, 3, 9, 36, 14, "-08:00") }
let(:run_status) { instance_double(Chef::RunStatus, :node => node, :run_id => run_id,
- :start_time => start_time, :end_time => end_time) }
+ :start_time => start_time, :end_time => end_time) }
describe "#audit_phase_start" do
@@ -86,12 +86,12 @@ describe Chef::Audit::AuditReporter do
context "when audit phase failed" do
let(:audit_error) { double("AuditError", :class => "Chef::Exceptions::AuditError",
- :message => "Audit phase failed with error message: derpderpderp",
- :backtrace => ["/path/recipe.rb:57", "/path/library.rb:106"]) }
+ :message => "Audit phase failed with error message: derpderpderp",
+ :backtrace => ["/path/recipe.rb:57", "/path/library.rb:106"]) }
- before do
- reporter.instance_variable_set(:@audit_phase_error, audit_error)
- end
+ before do
+ reporter.instance_variable_set(:@audit_phase_error, audit_error)
+ end
it "reports an error" do
reporter.run_completed(node)
@@ -191,7 +191,7 @@ EOM
expect(error).to receive(:respond_to?).with(:response).and_return(false)
allow(Chef::Log).to receive(:error).and_return(true)
expect(Chef::Log).to receive(:error).with(/Reporting fatals enabled. Aborting run./)
- expect{ reporter.run_completed(node) }.to raise_error(error)
+ expect { reporter.run_completed(node) }.to raise_error(error)
end
end
@@ -234,12 +234,12 @@ EOM
let(:run_data) { audit_data.to_hash }
let(:audit_error) { double("AuditError", :class => "Chef::Exceptions::AuditError",
- :message => "Audit phase failed with error message: derpderpderp",
- :backtrace => ["/path/recipe.rb:57", "/path/library.rb:106"]) }
+ :message => "Audit phase failed with error message: derpderpderp",
+ :backtrace => ["/path/recipe.rb:57", "/path/library.rb:106"]) }
let(:run_error) { double("RunError", :class => "Chef::Exceptions::RunError",
- :message => "This error shouldn't be reported.",
- :backtrace => ["fix it", "fix it", "fix it"]) }
+ :message => "This error shouldn't be reported.",
+ :backtrace => ["fix it", "fix it", "fix it"]) }
before do
allow(reporter).to receive(:auditing_enabled?).and_return(true)
@@ -366,7 +366,7 @@ EOM
context "when a control group with the same name has been seen" do
it "raises an exception" do
expect(ordered_control_groups).to receive(:has_key?).with(name).and_return(true)
- expect{ reporter.control_group_started(name) }.to raise_error(Chef::Exceptions::AuditControlGroupDuplicate)
+ expect { reporter.control_group_started(name) }.to raise_error(Chef::Exceptions::AuditControlGroupDuplicate)
end
end
end