X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fprivate_spec.rb;fp=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fprivate_spec.rb;h=a13be6439c71b5a13c5b800ce8de54229c79d264;hb=6963202b4b62c2816655ac9532521b018fdf83bd;hp=c90282ed70e9fbfd9ec4babeacaf77516c21f874;hpb=a69999e580f8b3abd12446c2d6ad59e517651813;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/private_spec.rb b/3rdparty/modules/stdlib/spec/functions/private_spec.rb index c90282ed7..a13be6439 100644 --- a/3rdparty/modules/stdlib/spec/functions/private_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/private_spec.rb @@ -1,17 +1,13 @@ -#! /usr/bin/env ruby -S rspec require 'spec_helper' -describe Puppet::Parser::Functions.function(:private) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - subject do - function_name = Puppet::Parser::Functions.function(:private) - scope.method(function_name) - end - +describe 'private' do it 'should issue a warning' do scope.expects(:warning).with("private() DEPRECATED: This function will cease to function on Puppet 4; please use assert_private() before upgrading to puppet 4 for backwards-compatibility, or migrate to the new parser's typing system.") - subject.call [] + begin + subject.call [] + rescue + # ignore this + end end context "when called from inside module" do