Add new-klecker as a static mirror
[mirror/dsa-puppet.git] / 3rdparty / modules / archive / spec / defines / artifactory_spec.rb
index 4fa2b45..63b03d8 100644 (file)
@@ -3,9 +3,10 @@ require 'spec_helper'
 describe 'archive::artifactory' do
   let(:facts) { { os: { family: 'RedHat' }, puppetversion: '4.4.0' } }
 
-  # Mock Puppet V4 API ruby function with a puppet language function equivalent
-  let(:pre_condition) do
-    'function archive::artifactory_checksum($url,$type) { return \'0d4f4b4b039c10917cfc49f6f6be71e4\' }'
+  before do
+    MockFunction.new('artifactory_sha1') do |f|
+      f.stub.returns('0d4f4b4b039c10917cfc49f6f6be71e4')
+    end
   end
 
   context 'artifactory archive with defaults' do