Remove deprecated test fn calls outside of tests 60/71060/1
authorDaniel Farrell <dfarrell@redhat.com>
Wed, 18 Apr 2018 01:17:25 +0000 (21:17 -0400)
committerDaniel Farrell <dfarrell@redhat.com>
Wed, 18 Apr 2018 01:17:25 +0000 (21:17 -0400)
Calls like these outside of test blocks throw deprecation warnings and
fail tests.

> Mocha methods cannot be used outside the context of a test

Just removing them makes the tests pass.

Issue: INTPAK-160
Change-Id: I5a4a94102338454bf3e03e9d6002c6c5b6f8e4f0
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
spec/unit/provider/jks_spec.rb

index 2650fbae87dc88c8989710a3cbf7750b8004773d..04c9ca45e4a6f3e0aef4c9c694c122afa59075db 100644 (file)
@@ -3,18 +3,10 @@ require 'puppet/provider/odl_keystore/jks'
 require 'spec_helper'
 require 'fileutils'
 
-File.any_instance.stubs(:file?).returns(true)
-
 provider_class = Puppet::Type.type(:odl_keystore).provider(:jks)
 
 describe 'Puppet::Type.type(:odl_keystore).provider(:jks)' do
 
-  before(:all) do
-    FileUtils.stubs(:mkdir_p).returns(true)
-    FileUtils.stubs(:chown)
-    FileUtils.stubs(:rm)
-  end
-
   let :odl_attrs do
     {
       :name      => 'controller',