Sha256: e04ff01ffd88d439a8daced2577dce1e6ff138c1c13ddcfaf1ae0771a4785db4

Contents?: true

Size: 795 Bytes

Versions: 3

Compression:

Stored size: 795 Bytes

Contents

require 'beaker-rspec'
require 'beaker/puppet_install_helper'

default_modules = [
  "puppetlabs-stdlib",
]

run_puppet_install_helper

RSpec.configure do |c|
  proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))

  c.before :suite do
    hosts.each do |host|

      default_modules.each do |default_module|
        on host, puppet("module install #{default_module}"), {:acceptable_exit_codes => [0]}
      end

      copy_module_to(host, :source => proj_root, :module_name => '<%= module_name %>')
    end
  end
end

shared_examples "an idempotent resource" do
  it 'should apply without errors' do
    apply_manifest(manifest, :catch_failures => true)
  end

  it 'should apply a second time without changes' do
    apply_manifest(manifest, :catch_changes => true)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
puppet-magnum-4.0.2 generator_files/spec/acceptance/spec_helper_acceptance.rb.erb
puppet-magnum-4.0.1 generator_files/spec/acceptance/spec_helper_acceptance.rb.erb
puppet-magnum-4.0.0 generator_files/spec/acceptance/spec_helper_acceptance.rb.erb