Sha256: 2504ee2b7c798ed35812455682e4dce854135b4f5ff5c3cb7ebf1f1f0e45848e

Contents?: true

Size: 980 Bytes

Versions: 16

Compression:

Stored size: 980 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 do
        allow(instance).to receive(:identify_windows_architecture)
      end

      context 'cygwin does not exist' do
        before 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

16 entries across 16 versions & 1 rubygems

Version Path
beaker-6.4.1 spec/beaker/host/windows/pkg_spec.rb
beaker-6.4.0 spec/beaker/host/windows/pkg_spec.rb
beaker-6.3.0 spec/beaker/host/windows/pkg_spec.rb
beaker-6.2.0 spec/beaker/host/windows/pkg_spec.rb
beaker-6.1.0 spec/beaker/host/windows/pkg_spec.rb
beaker-5.8.1 spec/beaker/host/windows/pkg_spec.rb
beaker-5.8.0 spec/beaker/host/windows/pkg_spec.rb
beaker-5.7.0 spec/beaker/host/windows/pkg_spec.rb
beaker-5.6.0 spec/beaker/host/windows/pkg_spec.rb
beaker-5.5.0 spec/beaker/host/windows/pkg_spec.rb
beaker-5.4.0 spec/beaker/host/windows/pkg_spec.rb
beaker-5.3.1 spec/beaker/host/windows/pkg_spec.rb
beaker-5.3.0 spec/beaker/host/windows/pkg_spec.rb
beaker-5.2.0 spec/beaker/host/windows/pkg_spec.rb
beaker-5.1.0 spec/beaker/host/windows/pkg_spec.rb
beaker-5.0.0 spec/beaker/host/windows/pkg_spec.rb