Sha256: 3750605fde42f0b2efbc44ef9b7b447aa0d661624fdb23fe717a34f4c303c29a

Contents?: true

Size: 1007 Bytes

Versions: 54

Compression:

Stored size: 1007 Bytes

Contents

require 'spec_helper'

class ClassMixedWithDSLWrappers
  include Beaker::DSL::Wrappers
end

describe ClassMixedWithDSLWrappers do
  let(:empty_opts) { {'ENV' => {}, :cmdexe => true } }

  describe '#facter' do
    it 'should split out the options and pass "facter" as first arg to Command' do
      expect( Beaker::Command ).to receive( :new ).
        with('facter', [ '-p' ], empty_opts)
      subject.facter( '-p' )
    end
  end

  describe '#cfacter' do
    it 'should split out the options and pass "cfacter" as first arg to Command' do
      expect( Beaker::Command ).to receive( :new ).
        with('cfacter', [ '-p' ], empty_opts)
      subject.cfacter( '-p' )
    end
  end

  describe 'deprecated puppet wrappers' do
    %w( resource doc kick cert apply master agent filebucket ).each do |sub|
      it "#{sub} delegates the proper info to #puppet" do
        expect( subject ).to receive( :puppet ).with( sub, 'blah' )
        subject.send( "puppet_#{sub}", 'blah')
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
beaker-puppet-1.18.13 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.12 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.11 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.10 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.9 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.8 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.7 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.6 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.5 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.4 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.3 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.2 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.1 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.18.0 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.17.0 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.16.0 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.15.1 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.15.0 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.14.0 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-1.13.0 spec/beaker-puppet/wrappers_spec.rb