summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xspec/functions/ensure_resource_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/functions/ensure_resource_spec.rb b/spec/functions/ensure_resource_spec.rb
index 9a17f5b..d552f4e 100755
--- a/spec/functions/ensure_resource_spec.rb
+++ b/spec/functions/ensure_resource_spec.rb
@@ -4,7 +4,12 @@ describe 'ensure_resource' do
it { is_expected.not_to eq(nil) }
it { is_expected.to run.with_params().and_raise_error(ArgumentError, /Must specify a type/) }
it { is_expected.to run.with_params('type').and_raise_error(ArgumentError, /Must specify a title/) }
- it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(Puppet::ParseError) }
+ if Puppet.version.to_f >= 4.6
+ it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(ArgumentError) }
+ else
+ it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(Puppet::ParseError) }
+ end
+
it {
pending("should not accept numbers as arguments")
is_expected.to run.with_params(1,2,3).and_raise_error(Puppet::ParseError)