diff options
author | Adrien Thebo <git@somethingsinistral.net> | 2013-05-15 10:58:04 -0700 |
---|---|---|
committer | Adrien Thebo <git@somethingsinistral.net> | 2013-05-15 10:58:04 -0700 |
commit | dad3a2948fb9ebc5c45975340bc8796c9c041d9a (patch) | |
tree | ec211cd78e4b7f01d4ef52f2cc488258d60899f2 /spec/unit | |
parent | 1ffd72daaaf21e71e762b6cd543043680bdb6694 (diff) | |
parent | b975bd66aa7345a5eeb54eb79dd0f708934609f8 (diff) |
Merge pull request #147 from mhellmic/master
don't fail on undef variable in merge
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/puppet/parser/functions/merge_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/puppet/parser/functions/merge_spec.rb b/spec/unit/puppet/parser/functions/merge_spec.rb index 04169e7..8a170bb 100644 --- a/spec/unit/puppet/parser/functions/merge_spec.rb +++ b/spec/unit/puppet/parser/functions/merge_spec.rb @@ -26,6 +26,11 @@ describe Puppet::Parser::Functions.function(:merge) do describe 'when calling merge on the scope instance' do it 'should require all parameters are hashes' do expect { new_hash = scope.function_merge([{}, '2'])}.to raise_error(Puppet::ParseError, /unexpected argument type String/) + expect { new_hash = scope.function_merge([{}, 2])}.to raise_error(Puppet::ParseError, /unexpected argument type Fixnum/) + end + + it 'should accept empty strings as puppet undef' do + expect { new_hash = scope.function_merge([{}, ''])}.not_to raise_error(Puppet::ParseError, /unexpected argument type String/) end it 'should be able to merge two hashes' do |