From 62a468ab27a9ebafacd100a2acfa598f9a8a4fff Mon Sep 17 00:00:00 2001 From: Xingchao Yu Date: Fri, 22 Jan 2016 19:09:19 +0800 Subject: [PATCH] Add spec_helper and spec_helper_acceptance file - spec_helper.rb - spec_helper_acceptance.rb --- spec/spec_helper.rb | 19 +++++++++++++++++++ spec/spec_helper_acceptance.rb | 1 + 2 files changed, 20 insertions(+) create mode 100644 spec/spec_helper.rb create mode 100644 spec/spec_helper_acceptance.rb diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..bd97904 --- /dev/null +++ b/spec/spec_helper.rb @@ -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! } diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb new file mode 100644 index 0000000..9196bc9 --- /dev/null +++ b/spec/spec_helper_acceptance.rb @@ -0,0 +1 @@ +require 'puppet-openstack_spec_helper/beaker_spec_helper'