aboutsummaryrefslogtreecommitdiff
path: root/spec/unit/type/cron_spec.rb
diff options
context:
space:
mode:
authorGabriel Nagy <gabriel.nagy@puppet.com>2021-10-01 14:57:09 +0300
committerGabriel Nagy <gabriel.nagy@puppet.com>2021-10-01 14:57:09 +0300
commitdd42efd5323314047d2c44e02f2f7e3472954697 (patch)
treeaf6c3b59e878235d5e3736276e8fd22171465455 /spec/unit/type/cron_spec.rb
parent54db10d91bb5da04f8f4fb9d66138aba9e5e38a4 (diff)
downloadpuppet-cron_core-dd42efd5323314047d2c44e02f2f7e3472954697.tar.gz
puppet-cron_core-dd42efd5323314047d2c44e02f2f7e3472954697.tar.bz2
(MODULES-11197) Update to pdk-templates 2.2.0
Includes REFERENCE.md ToC fixes for MODULES-8183.
Diffstat (limited to 'spec/unit/type/cron_spec.rb')
-rw-r--r--spec/unit/type/cron_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/type/cron_spec.rb b/spec/unit/type/cron_spec.rb
index 78deabf..9564d16 100644
--- a/spec/unit/type/cron_spec.rb
+++ b/spec/unit/type/cron_spec.rb
@@ -21,19 +21,19 @@ describe Puppet::Type.type(:cron), unless: Puppet.features.microsoft_windows? do
describe 'when validating attributes' do
[:name, :provider].each do |param|
- it "should have a #{param} parameter" do
+ it "has a #{param} parameter" do
expect(described_class.attrtype(param)).to eq(:param)
end
end
[:command, :special, :minute, :hour, :weekday, :month, :monthday, :environment, :user, :target].each do |property|
- it "should have a #{property} property" do
+ it "has a #{property} property" do
expect(described_class.attrtype(property)).to eq(:property)
end
end
[:command, :minute, :hour, :weekday, :month, :monthday].each do |cronparam|
- it "should have #{cronparam} of type CronParam" do
+ it "has #{cronparam} of type CronParam" do
expect(described_class.attrclass(cronparam).ancestors).to include CronParam
end
end
@@ -490,7 +490,7 @@ describe Puppet::Type.type(:cron), unless: Puppet.features.microsoft_windows? do
describe 'special' do
['reboot', 'yearly', 'annually', 'monthly', 'weekly', 'daily', 'midnight', 'hourly'].each do |value|
- it "should support the value '#{value}'" do
+ it "supports the value '#{value}'" do
expect { described_class.new(name: 'foo', special: value) }.not_to raise_error
end
end
@@ -498,7 +498,7 @@ describe Puppet::Type.type(:cron), unless: Puppet.features.microsoft_windows? do
context 'when combined with numeric schedule fields' do
context "which are 'absent'" do
[['reboot', 'yearly', 'annually', 'monthly', 'weekly', 'daily', 'midnight', 'hourly'], :absent].flatten.each do |value|
- it "should accept the value '#{value}' for special" do
+ it "accepts the value '#{value}' for special" do
expect {
described_class.new(name: 'foo', minute: :absent, special: value)
}.not_to raise_error
@@ -507,7 +507,7 @@ describe Puppet::Type.type(:cron), unless: Puppet.features.microsoft_windows? do
end
context 'which are not absent' do
['reboot', 'yearly', 'annually', 'monthly', 'weekly', 'daily', 'midnight', 'hourly'].each do |value|
- it "should not accept the value '#{value}' for special" do
+ it "does not accept the value '#{value}' for special" do
expect {
described_class.new(name: 'foo', minute: '1', special: value)
}.to raise_error(Puppet::Error, %r{cannot specify both a special schedule and a value})