summaryrefslogtreecommitdiff
path: root/spec/unit/provider
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-03-23 12:00:40 -0700
committerTim Smith <tsmith84@gmail.com>2020-03-23 12:00:40 -0700
commit25cbdcb2c9d3340a58a398e0ed50eb30441d6119 (patch)
tree9c579bed7d0a7a9b18b18509bc811b7746a1dd4a /spec/unit/provider
parent27c958e6b02ed720f155c996afba3befc9ada5ed (diff)
downloadchef-25cbdcb2c9d3340a58a398e0ed50eb30441d6119.tar.gz
Move the first part of the cron resource over to mixin cron validations
Reduces duplicate code and allows us to convert these to properties which show in the resource inspector and can be automatically documented. One change to how the properties work: We no longer convert Integers to Strings since I couldn't determine why we'd want to do this. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/provider')
-rw-r--r--spec/unit/provider/cron_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/provider/cron_spec.rb b/spec/unit/provider/cron_spec.rb
index 06628b631b..bebde66a8b 100644
--- a/spec/unit/provider/cron_spec.rb
+++ b/spec/unit/provider/cron_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Bryan McLellan (btm@loftninjas.org)
-# Copyright:: Copyright 2009-2016, Bryan McLellan
+# Copyright:: Copyright 2009-2020, Bryan McLellan
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -403,7 +403,7 @@ describe Chef::Provider::Cron do
%i{minute hour day month weekday command mailto path shell home}.each do |property|
it "should return true if #{property} doesn't match" do
- @new_resource.send(property, "something_else")
+ @new_resource.send(property, "1") # we use 1 in order to pass resource validation. We're just using a value that's different.
expect(@provider.cron_different?).to eql(true)
end
end