diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-05 13:41:00 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-05 13:41:00 -0700 |
commit | 174a2748b54a5dbd746005e2aead59221b80f2b9 (patch) | |
tree | 55e4bacca96b540526f3c19a00d666e68610ea6e /spec/support/shared/unit | |
parent | 3b10f9ca503dcbce747241281b9151d3d010f9ef (diff) | |
download | chef-174a2748b54a5dbd746005e2aead59221b80f2b9.tar.gz |
fix 4 cops
- Layout/MultilineMethodCallBraceLayout
- Layout/ClosingParenthesisIndentation
- Layout/IndentFirstArgument
EnforcedStyle: consistent
- Layout/BlockEndNewline
the first of these autocorrected to horrible looking code which exposed
that we really needed the other three as well, which also cleaned up a
bunch of other terrible looking code.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/support/shared/unit')
-rw-r--r-- | spec/support/shared/unit/application_dot_d.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/support/shared/unit/application_dot_d.rb b/spec/support/shared/unit/application_dot_d.rb index 505fe08190..0f2f06eff8 100644 --- a/spec/support/shared/unit/application_dot_d.rb +++ b/spec/support/shared/unit/application_dot_d.rb @@ -33,7 +33,9 @@ shared_examples_for "an application that loads a dot d" do # make sure that we are correctly globbing. let(:client_d_dir) do Chef::Util::PathHelper.cleanpath( - File.join(File.dirname(__FILE__), "../../../data/client.d_00")) end + File.join(File.dirname(__FILE__), "../../../data/client.d_00") + ) + end it "loads the configuration in order" do expect(IO).to receive(:read).with(Pathname.new("#{client_d_dir}/00-foo.rb").cleanpath.to_s).and_return("foo 0") @@ -50,7 +52,9 @@ shared_examples_for "an application that loads a dot d" do context "when client_d_dir is set to a directory without configuration" do let(:client_d_dir) do Chef::Util::PathHelper.cleanpath( - File.join(File.dirname(__FILE__), "../../data/client.d_01")) end + File.join(File.dirname(__FILE__), "../../data/client.d_01") + ) + end # client.d_01 has a nested folder with a rb file that if # executed, would raise an exception. If it is executed, @@ -66,7 +70,9 @@ shared_examples_for "an application that loads a dot d" do # foo.rb as a directory should be ignored let(:client_d_dir) do Chef::Util::PathHelper.cleanpath( - File.join(File.dirname(__FILE__), "../../data/client.d_02")) end + File.join(File.dirname(__FILE__), "../../data/client.d_02") + ) + end it "does not raise an exception" do expect { app.reconfigure }.not_to raise_error |