summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/parser
diff options
context:
space:
mode:
authorAshley Penney <ashley.penney@puppetlabs.com>2014-03-18 12:34:40 -0400
committerAshley Penney <ashley.penney@puppetlabs.com>2014-03-18 12:34:40 -0400
commitfec943f441f0c6ab8d6b685091d3418ec0e265b4 (patch)
tree144aed26b9fb50790708c5b221afdeb32bc03186 /spec/unit/puppet/parser
parent326a8fd801ecba11005189c10ca8749872ef6577 (diff)
parent9aa28f1c100d7703aa1bb9fbe2bcf02bf781b486 (diff)
downloadpuppet-stdlib-fec943f441f0c6ab8d6b685091d3418ec0e265b4.tar.gz
puppet-stdlib-fec943f441f0c6ab8d6b685091d3418ec0e265b4.tar.bz2
Merge pull request #231 from apenney/32-testing
Numerous changes to update testing gems.
Diffstat (limited to 'spec/unit/puppet/parser')
-rw-r--r--spec/unit/puppet/parser/functions/merge_spec.rb7
-rw-r--r--spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb4
2 files changed, 8 insertions, 3 deletions
diff --git a/spec/unit/puppet/parser/functions/merge_spec.rb b/spec/unit/puppet/parser/functions/merge_spec.rb
index db7d837..79079b6 100644
--- a/spec/unit/puppet/parser/functions/merge_spec.rb
+++ b/spec/unit/puppet/parser/functions/merge_spec.rb
@@ -25,7 +25,12 @@ 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'])}.should raise_error(Puppet::ParseError, /unexpected argument type String/)
+ 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([{}, ''])}.to raise_error
end
it 'should be able to merge two hashes' do
diff --git a/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb b/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb
index 08aaf78..1c9cce2 100644
--- a/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb
@@ -35,7 +35,7 @@ describe Puppet::Parser::Functions.function(:validate_absolute_path) do
end
valid_paths.each do |path|
it "validate_absolute_path(#{path.inspect}) should not fail" do
- expect { subject.call [path] }.not_to raise_error Puppet::ParseError
+ expect { subject.call [path] }.not_to raise_error
end
end
end
@@ -43,7 +43,7 @@ describe Puppet::Parser::Functions.function(:validate_absolute_path) do
context "Puppet without mocking" do
valid_paths.each do |path|
it "validate_absolute_path(#{path.inspect}) should not fail" do
- expect { subject.call [path] }.not_to raise_error Puppet::ParseError
+ expect { subject.call [path] }.not_to raise_error
end
end
end