diff options
author | Travis Fields <travis@puppetlabs.com> | 2015-01-13 17:16:10 -0800 |
---|---|---|
committer | Travis Fields <travis@puppetlabs.com> | 2015-01-13 17:16:10 -0800 |
commit | ac3e51bac57ecc4b29965b5df5f10c2934b61cd0 (patch) | |
tree | 71413b757c0e0ec4d21727386979354e50099fdc /spec/functions/type_spec.rb | |
parent | 80f09623b63cf6946b5913b629911e2c49b5d1dd (diff) | |
parent | 8db1f2e2f082cd688fa061fd6840cd0cea747232 (diff) | |
download | puppet-stdlib-ac3e51bac57ecc4b29965b5df5f10c2934b61cd0.tar.gz puppet-stdlib-ac3e51bac57ecc4b29965b5df5f10c2934b61cd0.tar.bz2 |
Merge branch 'master' into 4.5.x
Diffstat (limited to 'spec/functions/type_spec.rb')
-rwxr-xr-x | spec/functions/type_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/functions/type_spec.rb b/spec/functions/type_spec.rb index 9dfe9d7..b683fcf 100755 --- a/spec/functions/type_spec.rb +++ b/spec/functions/type_spec.rb @@ -7,8 +7,9 @@ describe "the type function" do expect(Puppet::Parser::Functions.function("type")).to eq("function_type") end - it "should raise a ParseError if there is less than 1 arguments" do - expect { scope.function_type([]) }.to( raise_error(Puppet::ParseError)) + it "should give a deprecation warning when called" do + scope.expects(:warning).with("type() DEPRECATED: This function will cease to function on Puppet 4; please use type3x() before upgrading to puppet 4 for backwards-compatibility, or migrate to the new parser's typing system.") + scope.function_type(["aoeu"]) end it "should return string when given a string" do |