summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-06-05 14:29:15 -0700
committerPete Higgins <pete@peterhiggins.org>2020-06-05 14:29:15 -0700
commit177fa21124e92d109d63ca1daadc0097097e9a6b (patch)
tree4d9691a521dfa636d9d5bd015955199dd4544240
parentc6fd63bda42c07dc33684240246e42fb31e0bb86 (diff)
downloadchef-fix-wrong-unit-test.tar.gz
Fix chefstyle violations.fix-wrong-unit-test
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r--lib/chef/resource/chef_client_scheduled_task.rb2
-rw-r--r--spec/unit/mixin/user_context_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/chef_client_scheduled_task.rb b/lib/chef/resource/chef_client_scheduled_task.rb
index cdbf6420ac..f730c12ef1 100644
--- a/lib/chef/resource/chef_client_scheduled_task.rb
+++ b/lib/chef/resource/chef_client_scheduled_task.rb
@@ -82,7 +82,7 @@ class Chef
coerce: proc { |x| Integer(x) },
callbacks: { "should be a positive number" => proc { |v| v > 0 } },
description: "Numeric value to go with the scheduled task frequency",
- default: lazy { frequency == "minute" ? 30 : 1 },
+ default: lazy { frequency == "minute" ? 30 : 1 },
default_description: "30 if frequency is 'minute', 1 otherwise"
property :accept_chef_license, [true, false],
diff --git a/spec/unit/mixin/user_context_spec.rb b/spec/unit/mixin/user_context_spec.rb
index 2431c4b881..6c2ea298ae 100644
--- a/spec/unit/mixin/user_context_spec.rb
+++ b/spec/unit/mixin/user_context_spec.rb
@@ -79,7 +79,7 @@ describe "a class that mixes in user_context" do
context "when the block raises an exception" do
it "closes the logon session so resources are not leaked" do
expect(logon_session).to receive(:close)
- expect { instance_with_user_context.with_context("kamilah", nil, "chef4life") { 1/0 } }.to raise_error(ZeroDivisionError)
+ expect { instance_with_user_context.with_context("kamilah", nil, "chef4life") { 1 / 0 } }.to raise_error(ZeroDivisionError)
end
end
end