Sha256: 935c5ca3193f4620a8ba5b1b8e5cc36acb9257f69e02968d8f8f2382f28f487e

Contents?: true

Size: 812 Bytes

Versions: 4

Compression:

Stored size: 812 Bytes

Contents

require 'rspec-puppet'
require 'puppetlabs_spec_helper/puppet_spec_helper'
require 'puppetlabs_spec_helper/puppetlabs_spec/puppet_internals'

def param_value(subject, type, title, param)
  subject.resource(type, title).send(:parameters)[param.to_sym]
end

def verify_contents(subject, title, expected_lines)
  content = subject.resource('file', title).send(:parameters)[:content]
  (content.split("\n") & expected_lines).should == expected_lines
end

fixture_path = File.expand_path(File.join(Dir.pwd, 'spec/fixtures'))

env_module_path = ENV['MODULEPATH']
module_path = File.join(fixture_path, 'modules')

module_path = [module_path, env_module_path].join(File::PATH_SEPARATOR) if env_module_path

RSpec.configure do |c|
  c.module_path = module_path
  c.manifest_dir = File.join(fixture_path, 'manifests')
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
puppetlabs_spec_helper-0.5.2 lib/puppetlabs_spec_helper/module_spec_helper.rb
puppetlabs_spec_helper-0.5.1 lib/puppetlabs_spec_helper/module_spec_helper.rb
puppetlabs_spec_helper-0.5.0 lib/puppetlabs_spec_helper/module_spec_helper.rb
puppetlabs_spec_helper-0.4.1 lib/puppetlabs_spec_helper/module_spec_helper.rb