2012-06-18 16:12:32 -07:00
|
|
|
require 'puppetlabs_spec_helper/module_spec_helper'
|
2014-01-29 15:39:41 -05:00
|
|
|
require 'shared_examples'
|
|
|
|
|
2016-01-06 21:28:13 -07:00
|
|
|
require 'puppet-openstack_spec_helper/defaults'
|
|
|
|
require 'rspec-puppet-facts'
|
|
|
|
include RspecPuppetFacts
|
|
|
|
|
2014-01-29 15:39:41 -05:00
|
|
|
RSpec.configure do |c|
|
2014-05-15 14:59:31 -04:00
|
|
|
c.alias_it_should_behave_like_to :it_configures, 'configures'
|
2014-01-29 15:39:41 -05:00
|
|
|
c.alias_it_should_behave_like_to :it_raises, 'raises'
|
|
|
|
end
|
2014-10-20 17:45:21 -04:00
|
|
|
|
|
|
|
def verify_concat_fragment_contents(subject, title, expected_lines)
|
|
|
|
content = subject.resource('concat::fragment', title).send(:parameters)[:content]
|
2015-04-14 11:38:34 +02:00
|
|
|
expect(content.split("\n") & expected_lines).to eq(expected_lines)
|
2014-10-20 17:45:21 -04:00
|
|
|
end
|
2015-08-04 11:48:38 -07:00
|
|
|
|
|
|
|
at_exit { RSpec::Puppet::Coverage.report! }
|