ed4c76373a
puppetlabs_spec_helper recommends rspec-mocks instead of mocha[1] and
it uses rspec-mocks by default instead of mocha since v 5.0.0[2]
This is the prep work to adapt to that migration.
[1] https://github.com/puppetlabs/puppetlabs_spec_helper/#mock_with
[2] 493f0cbc1c
Closes-Bug: #2004135
Change-Id: If8bd21cfe760f7ba92af017981a39c80bdc2b676
21 lines
821 B
Ruby
21 lines
821 B
Ruby
# Load libraries here to simulate how they live together in a real puppet run (for provider unit tests)
|
|
$LOAD_PATH.push(File.join(File.dirname(__FILE__), 'fixtures', 'modules', 'inifile', 'lib'))
|
|
$LOAD_PATH.push(File.join(File.dirname(__FILE__), 'fixtures', 'modules', 'openstacklib', 'lib'))
|
|
require 'puppetlabs_spec_helper/module_spec_helper'
|
|
require 'shared_examples'
|
|
require 'puppet-openstack_spec_helper/facts'
|
|
|
|
fixture_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))
|
|
|
|
RSpec.configure do |c|
|
|
c.alias_it_should_behave_like_to :it_configures, 'configures'
|
|
c.alias_it_should_behave_like_to :it_raises, 'raises'
|
|
|
|
c.module_path = File.join(fixture_path, 'modules')
|
|
c.manifest_dir = File.join(fixture_path, 'manifests')
|
|
|
|
c.mock_with :rspec
|
|
end
|
|
|
|
at_exit { RSpec::Puppet::Coverage.report! }
|