diff --git a/spec/classes/server/global_spec.rb b/spec/classes/server/global_spec.rb index 77f5f2f..37cbaa2 100644 --- a/spec/classes/server/global_spec.rb +++ b/spec/classes/server/global_spec.rb @@ -2,9 +2,8 @@ describe 'rsync::server::global' do before(:each) do - Puppet::Parser::Functions.newfunction('assert_private') do |f| - f.stubs(:call).returns(true) - end + # Mask 'assert_private' for testing + Puppet::Parser::Functions.newfunction(:assert_private, :type => :rvalue) { |args| } end context 'supported operating systems' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6a687f0..56770df 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -94,7 +94,7 @@ def set_hieradata(hieradata) } c.mock_framework = :rspec - c.mock_with :mocha + c.mock_with :rspec c.module_path = File.join(fixture_path, 'modules') c.manifest_dir = File.join(fixture_path, 'manifests') if c.respond_to?(:manifest_dir)