Sha256: 1b448751f39974bf093b2ff535912ac0c4759ecc7269ed5f5248d72ac86d66e9

Contents?: true

Size: 555 Bytes

Versions: 14

Compression:

Stored size: 555 Bytes

Contents

require 'tempfile'

module RSpecSystem
  module Puppetfile
    def puppetfile_install(options = {})
      expected_exit_code = options.fetch(:exit_code, 0)

      shell %[r10k puppetfile install] do |results|
        expect(results.exit_code).to eq expected_exit_code
      end
    end

    def create_puppetfile(*mods)
      tmp = Tempfile.new('rs-r10k-puppetfile')
      tmp.write(mods.join("\n"))
      tmp.flush
      rcp :sp => tmp.path, :dp => "Puppetfile"
    end
  end
end

RSpec.configure do |config|
  config.include RSpecSystem::Puppetfile
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
r10k-1.3.5 spec/rspec-system-r10k/puppetfile.rb
r10k-1.3.4 spec/rspec-system-r10k/puppetfile.rb
r10k-1.2.4 spec/rspec-system-r10k/puppetfile.rb
r10k-1.3.3 spec/rspec-system-r10k/puppetfile.rb
r10k-1.3.2 spec/rspec-system-r10k/puppetfile.rb
r10k-1.2.3 spec/rspec-system-r10k/puppetfile.rb
r10k-1.3.1 spec/rspec-system-r10k/puppetfile.rb
r10k-1.2.2 spec/rspec-system-r10k/puppetfile.rb
r10k-1.3.0 spec/rspec-system-r10k/puppetfile.rb
r10k-1.3.0rc1 spec/rspec-system-r10k/puppetfile.rb
r10k-1.2.1 spec/rspec-system-r10k/puppetfile.rb
r10k-1.2.0 spec/rspec-system-r10k/puppetfile.rb
r10k-1.2.0rc2 spec/rspec-system-r10k/puppetfile.rb
r10k-1.2.0rc1 spec/rspec-system-r10k/puppetfile.rb