Changeset ad28f83 for src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_hash_spec.rb
- Timestamp:
- Aug 1, 2017, 3:45:14 PM (9 years ago)
- Branches:
- debian/bullseye, debian/jessie
- Children:
- ce0f6a4
- Parents:
- bcf0be5 (diff), cd0f9cc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_hash_spec.rb
rbcf0be5 rad28f83 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_hash function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_hash function' do 5 5 describe 'success' do 6 6 it 'validates a single argument' do … … 21 21 apply_manifest(pp, :catch_failures => true) 22 22 end 23 it 'validates a non-hash' do24 {25 %{validate_hash('{ "not" => "hash" }')} => "String",26 %{validate_hash('string')} => "String",27 %{validate_hash(["array"])} => "Array",28 %{validate_hash(undef)} => "String",29 }.each do |pp,type|30 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/ a #{type}/)23 [ 24 %{validate_hash('{ "not" => "hash" }')}, 25 %{validate_hash('string')}, 26 %{validate_hash(["array"])}, 27 %{validate_hash(undef)} 28 ].each do |pp| 29 it "rejects #{pp.inspect}" do 30 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(//) 31 31 end 32 32 end
Note:
See TracChangeset
for help on using the changeset viewer.
