Sha256: ad1f822b1890d0abb939813ca73750ba2e42371fe5933ddd9c60621f6f822dba

Contents?: true

Size: 1022 Bytes

Versions: 70

Compression:

Stored size: 1022 Bytes

Contents

require 'spec_helper'

module Beaker
  describe Windows::Pkg do
    class WindowsPkgTest
      include Windows::Pkg

      def initialize(hash, logger)
        @hash = hash
        @logger = logger
      end

      def [](k)
        @hash[k]
      end

      def to_s
        "me"
      end

      def exec
        #noop
      end

    end

    let (:opts)     { @opts || {} }
    let (:logger)   { double( 'logger' ).as_null_object }
    let (:instance) { WindowsPkgTest.new(opts, logger) }

    describe '#install_package' do
      before :each do
        allow( instance ).to receive( :identify_windows_architecture )
      end

      context 'cygwin does not exist' do
        before :each do
          allow( instance ).to receive( :check_for_command ).and_return( false )
        end

        it 'curls the SSL URL for cygwin\'s installer' do
          allow(  instance ).to receive( :execute ).with( /^setup\-x86/     ).ordered
          instance.install_package( 'curl' )
        end

      end
    end

  end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
beaker-4.38.1 spec/beaker/host/windows/pkg_spec.rb
beaker-4.38.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.37.2 spec/beaker/host/windows/pkg_spec.rb
beaker-4.37.1 spec/beaker/host/windows/pkg_spec.rb
beaker-4.37.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.36.1 spec/beaker/host/windows/pkg_spec.rb
beaker-4.36.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.35.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.34.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.33.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.32.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.31.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.30.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.29.1 spec/beaker/host/windows/pkg_spec.rb
beaker-4.29.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.28.1 spec/beaker/host/windows/pkg_spec.rb
beaker-4.28.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.27.1 spec/beaker/host/windows/pkg_spec.rb
beaker-4.27.0 spec/beaker/host/windows/pkg_spec.rb
beaker-4.26.0 spec/beaker/host/windows/pkg_spec.rb