Sha256: b48f8ba59dace5a387064b322f348b1ff780c7a8eba9ac1f0d15e00d13808ec9

Contents?: true

Size: 1.11 KB

Versions: 116

Compression:

Stored size: 1.11 KB

Contents

require 'spec_helper'

module PSWindows
  describe Host do
    let(:options)  { @options ? @options : {} }
    let(:platform) {
      if @platform
        { :platform => Beaker::Platform.new( @platform) }
      else
        { :platform => Beaker::Platform.new( 'windows-vers-arch-extra' ) }
      end
    }
    let(:host)    {
      opts = options.merge(platform)
      opts.merge!({ :is_cygwin => false })
      make_host( 'name', opts )
    }

    describe '#external_copy_base' do
      it 'returns previously calculated value if set' do
        external_copy_base_before = host.instance_variable_get( :@external_copy_base )
        test_value = :testn8391
        host.instance_variable_set( :@external_copy_base, test_value )

        expect( host ).not_to receive( :execute )
        expect( host.external_copy_base ).to be === test_value
        host.instance_variable_set( :@external_copy_base, external_copy_base_before )
      end

      it 'calls the correct command if unset' do
        expect( host ).to receive( :execute ).with( /^for\ .*ALLUSERSPROFILE.*\%\~I$/ )
        host.external_copy_base
      end
    end
  end
end

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
beaker-4.25.0 spec/beaker/host/pswindows_spec.rb
beaker-4.24.0 spec/beaker/host/pswindows_spec.rb
beaker-4.23.2 spec/beaker/host/pswindows_spec.rb
beaker-4.23.1 spec/beaker/host/pswindows_spec.rb
beaker-4.23.0 spec/beaker/host/pswindows_spec.rb
beaker-4.22.1 spec/beaker/host/pswindows_spec.rb
beaker-4.22.0 spec/beaker/host/pswindows_spec.rb
beaker-4.21.0 spec/beaker/host/pswindows_spec.rb
beaker-4.20.0 spec/beaker/host/pswindows_spec.rb
beaker-4.19.0 spec/beaker/host/pswindows_spec.rb
beaker-4.18.0 spec/beaker/host/pswindows_spec.rb
beaker-4.17.0 spec/beaker/host/pswindows_spec.rb
beaker-4.16.0 spec/beaker/host/pswindows_spec.rb
beaker-4.15.0 spec/beaker/host/pswindows_spec.rb
beaker-4.14.1 spec/beaker/host/pswindows_spec.rb
beaker-4.14.0 spec/beaker/host/pswindows_spec.rb
beaker-4.13.1 spec/beaker/host/pswindows_spec.rb
beaker-4.13.0 spec/beaker/host/pswindows_spec.rb
beaker-4.12.0 spec/beaker/host/pswindows_spec.rb
beaker-4.11.1 spec/beaker/host/pswindows_spec.rb