Move rspec-puppet-facts to spec helper

This change updates the module to use the rspec-puppet-facts as defined
in the puppet-openstack_spec_helper.

Change-Id: I90484a9b65a63c82ff08471b3ab144fc2a74ac42
This commit is contained in:
Alex Schultz 2016-09-30 13:24:39 -06:00
parent bec2257397
commit 10401d65fd

View File

@ -1,18 +1,10 @@
require 'puppetlabs_spec_helper/module_spec_helper' require 'puppetlabs_spec_helper/module_spec_helper'
require 'shared_examples' require 'shared_examples'
require 'puppet-openstack_spec_helper/facts'
require 'puppet-openstack_spec_helper/defaults'
require 'rspec-puppet-facts'
include RspecPuppetFacts
RSpec.configure do |c| RSpec.configure do |c|
c.alias_it_should_behave_like_to :it_configures, 'configures' c.alias_it_should_behave_like_to :it_configures, 'configures'
c.alias_it_should_behave_like_to :it_raises, 'raises' c.alias_it_should_behave_like_to :it_raises, 'raises'
# TODO(aschultz): remove this after all tests converted to use OSDefaults
# instead of referencing @default_facts
c.before :each do
@default_facts = OSDefaults.get_facts
end
end end
at_exit { RSpec::Puppet::Coverage.report! } at_exit { RSpec::Puppet::Coverage.report! }