Add spec_helper and spec_helper_acceptance file

- spec_helper.rb
 - spec_helper_acceptance.rb
This commit is contained in:
Xingchao Yu 2016-01-22 19:09:19 +08:00
parent 166914fd11
commit 62a468ab27
2 changed files with 20 additions and 0 deletions

19
spec/spec_helper.rb Normal file
View File

@ -0,0 +1,19 @@
require 'puppetlabs_spec_helper/module_spec_helper'
require 'shared_examples'
require 'webmock/rspec'
require 'puppet-openstack_spec_helper/defaults'
require 'rspec-puppet-facts'
include RspecPuppetFacts
RSpec.configure do |c|
c.alias_it_should_behave_like_to :it_configures, 'configures'
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
at_exit { RSpec::Puppet::Coverage.report! }

View File

@ -0,0 +1 @@
require 'puppet-openstack_spec_helper/beaker_spec_helper'