diff options
Diffstat (limited to 'spec/unit/puppet/parser/functions/validate_re_spec.rb')
-rw-r--r-- | spec/unit/puppet/parser/functions/validate_re_spec.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/unit/puppet/parser/functions/validate_re_spec.rb b/spec/unit/puppet/parser/functions/validate_re_spec.rb index c35ae14..d189efb 100644 --- a/spec/unit/puppet/parser/functions/validate_re_spec.rb +++ b/spec/unit/puppet/parser/functions/validate_re_spec.rb @@ -1,17 +1,13 @@ require 'spec_helper' describe Puppet::Parser::Functions.function(:validate_re) do - before :all do - Puppet::Parser::Functions.autoloader.loadall - end - - let(:scope) do - scope = Puppet::Parser::Scope.new - end + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } # The subject of these examplres is the method itself. subject do - scope.method :function_validate_re + # This makes sure the function is loaded within each test + function_name = Puppet::Parser::Functions.function(:validate_re) + scope.method(function_name) end context 'Using Puppet::Parser::Scope.new' do |