diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-31 09:57:05 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-31 09:57:05 -0700 |
commit | 14b9553818265ecc35c037adfe479320e3a70e34 (patch) | |
tree | ec8f36c6f929f0c0b56f062484a280d6e645d61e /spec/unit/provider/cron_spec.rb | |
parent | f051b6e7912086edc03747f4b1c0285bfb6597f5 (diff) | |
download | chef-lcg/weirich-semantic-block.tar.gz |
For Discussion: Weirich Semantic Block stylelcg/weirich-semantic-block
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 <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/provider/cron_spec.rb')
-rw-r--r-- | spec/unit/provider/cron_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
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 |