Sha256: d2e94da9bd4721c26798892bdc966804dd9e7ab55c41c6491e32ebad14c8f368

Contents?: true

Size: 1.1 KB

Versions: 16

Compression:

Stored size: 1.1 KB

Contents

require 'spec_helper'

class ClassMixedWithDSLHelpers
  include Beaker::DSL::Helpers::HostHelpers
end

describe ClassMixedWithDSLHelpers do
  let(:privatebindir) { 'C:\\Program Files\\Puppet Labs\\Puppet\\bin' }

  context 'when platform is windows and non cygwin' do
    let(:winhost) { make_host('winhost_non_cygwin', { :platform => 'windows',
                                                      :privatebindir => privatebindir,
                                                      :is_cygwin => 'false' }) }

    it 'run the correct ruby_command' do
      expect(subject.ruby_command(winhost)).to eq("cmd /V /C \"set PATH=#{privatebindir};!PATH! && ruby\"")
    end
  end

  context 'when platform is windows and cygwin' do
    let(:winhost) { make_host('winhost', { :platform => Beaker::Platform.new('windows-2016-a64'),
                                           :privatebindir => privatebindir,
                                           :is_cygwin => true }) }

    it 'run the correct ruby_command' do
      expect(subject.ruby_command(winhost)).to eq("env PATH=\"#{privatebindir}:${PATH}\" ruby")
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
beaker-puppet-1.29.0 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.28.0 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.27.0 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.26.3 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.26.2 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.26.1 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.26.0 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.25.0 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.24.0 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.23.0 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.22.2 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.22.1 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.22.0 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.21.0 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.20.0 spec/beaker-puppet/helpers/host_helpers_spec.rb
beaker-puppet-1.19.2 spec/beaker-puppet/helpers/host_helpers_spec.rb