From 14b9553818265ecc35c037adfe479320e3a70e34 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Wed, 31 Jul 2019 09:57:05 -0700 Subject: For Discussion: Weirich Semantic Block style Style/BlockDelimiters: Enabled: true EnforcedStyle: semantic See, eg: https://github.com/rubocop-hq/ruby-style-guide/issues/162 http://www.virtuouscode.com/2011/07/26/the-procedurefunction-block-convention-in-ruby/ Signed-off-by: Lamont Granquist --- spec/unit/provider/cron_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/unit/provider/cron_spec.rb') diff --git a/spec/unit/provider/cron_spec.rb b/spec/unit/provider/cron_spec.rb index 4cd8a140af..c3a2409d82 100644 --- a/spec/unit/provider/cron_spec.rb +++ b/spec/unit/provider/cron_spec.rb @@ -194,9 +194,9 @@ describe Chef::Provider::Cron do # Chef Name: foo[bar] (baz) 21 */4 * * * some_prog 1234567 CRONTAB - expect do + expect { @provider.load_current_resource - end.not_to raise_error + }.not_to raise_error end end @@ -799,9 +799,9 @@ describe Chef::Provider::Cron do it "should throw an error" do @new_resource.shell "/bash" @new_resource.environment "SHELL" => "/bash" - expect do + expect { @provider.run_action(:create) - end.to raise_error(Chef::Exceptions::Cron, /cronhole some stuff: the 'SHELL' property is set and environment property also contains the 'SHELL' variable. Remove the variable from the environment property./) + }.to raise_error(Chef::Exceptions::Cron, /cronhole some stuff: the 'SHELL' property is set and environment property also contains the 'SHELL' variable. Remove the variable from the environment property./) end end @@ -1034,9 +1034,9 @@ describe Chef::Provider::Cron do it "should raise an exception if the command returns non-zero" do @status = double("Status", exitstatus: 1) allow(@provider).to receive(:shell_out!).and_raise(Mixlib::ShellOut::ShellCommandFailed) - expect do + expect { @provider.send(:write_crontab, "Foo") - end.to raise_error(Chef::Exceptions::Cron) + }.to raise_error(Chef::Exceptions::Cron) end end -- cgit v1.2.1