diff --git a/config_defaults.yml b/config_defaults.yml index 5980f81..a4d5ee6 100644 --- a/config_defaults.yml +++ b/config_defaults.yml @@ -5,6 +5,7 @@ Gemfile: - gem: puppetlabs_spec_helper - gem: rspec-puppet version: '~> 2.2.0' + - gem: rspec-puppet-facts - gem: metadata-json-lint - gem: puppet-lint-param-docs - gem: puppet-lint-absolute_classname-check @@ -16,6 +17,8 @@ Gemfile: - gem: puppet-lint-numericvariable - gem: json - gem: webmock + - gem: 'puppet-openstack_spec_helper' + git: 'https://git.openstack.org/openstack/puppet-openstack_spec_helper' ':system_tests': - gem: beaker-rspec - gem: beaker-puppet_install_helper diff --git a/moduleroot/spec/spec_helper.rb b/moduleroot/spec/spec_helper.rb index 9bc7bcf..bd97904 100644 --- a/moduleroot/spec/spec_helper.rb +++ b/moduleroot/spec/spec_helper.rb @@ -2,11 +2,17 @@ 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 = { :os_service_default => '' } + @default_facts = OSDefaults.get_facts end end