summaryrefslogtreecommitdiff
path: root/spec/acceptance/validate_bool_spec.rb
diff options
context:
space:
mode:
authorHelen Campbell <helen@puppetlabs.com>2016-09-15 11:35:38 +0100
committerHelen Campbell <helen@puppetlabs.com>2016-09-21 10:19:16 +0100
commit0ec7ffa5c086c8a1c6e871b086299dd1953fa8ba (patch)
tree6d8db086ef7b3f0ceb269058f25f48ee0d1d340b /spec/acceptance/validate_bool_spec.rb
parentdce8d7b194e3f6d9bb24e076c6e835aeb671099a (diff)
Ensure validate functions use Puppet 4 deprecation
Diffstat (limited to 'spec/acceptance/validate_bool_spec.rb')
-rwxr-xr-xspec/acceptance/validate_bool_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/acceptance/validate_bool_spec.rb b/spec/acceptance/validate_bool_spec.rb
index c837f08..5c52d0f 100755
--- a/spec/acceptance/validate_bool_spec.rb
+++ b/spec/acceptance/validate_bool_spec.rb
@@ -20,14 +20,14 @@ describe 'validate_bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fac
apply_manifest(pp, :catch_failures => true)
end
- it 'validates a non-bool' do
- {
- %{validate_bool('true')} => "String",
- %{validate_bool('false')} => "String",
- %{validate_bool([true])} => "Array",
- %{validate_bool(undef)} => "String",
- }.each do |pp,type|
- expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/)
+ [
+ %{validate_bool('true')},
+ %{validate_bool('false')},
+ %{validate_bool([true])},
+ %{validate_bool(undef)}
+ ].each do |pp|
+ it "rejects #{pp.inspect}" do
+ expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/is not a boolean\. It looks to be a/)
end
end
end