Sha256: 8e542a06beafa17d481ef18c421ff3cd752ae9937055d91f8b8f41d38e8d5582

Contents?: true

Size: 983 Bytes

Versions: 8

Compression:

Stored size: 983 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

8 entries across 8 versions & 1 rubygems

Version Path
beaker-puppet-4.2.0 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-4.1.1 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-4.1.0 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-4.0.0 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-2.1.0 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-3.0.1 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-3.0.0 spec/beaker-puppet/wrappers_spec.rb
beaker-puppet-2.0.0 spec/beaker-puppet/wrappers_spec.rb