[INTPAK-160] Fix "Mocha methods cannot be used outside the context of a test" Created: 18/Apr/18  Updated: 20/Apr/18  Resolved: 20/Apr/18

Status: Closed
Project: integration-packaging
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: High
Reporter: Daniel Farrell Assignee: Daniel Farrell
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Calling some test functions outside of test blocks seems to now fail tests.

See all of the recent puppet-test-full-STEAM jobs:

An error occurred while loading ./spec/unit/provider/jks_spec.rb.
Failure/Error: File.any_instance.stubs(:file?).returns(true)

Mocha::NotInitializedError:
Mocha methods cannot be used outside the context of a test

  1. ./spec/unit/provider/jks_spec.rb:6:in `<top (required)>'

Deprecation Warnings:

puppetlabs_spec_helper: defaults `mock_with` to `:mocha`. See https://github.com/puppetlabs/puppetlabs_spec_helper#mock_with to choose a sensible value for you

https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/puppet-test-full-master/405/console.log.gz



 Comments   
Comment by Daniel Farrell [ 20/Apr/18 ]

Fixed here: https://git.opendaylight.org/gerrit/#/c/71060/

Generated at Wed Feb 07 20:03:46 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.