Sha256: 9488ced83db1cf17a3ac734f4566d15488c6c3270dd0dda1ed2d0e2fa9f7b535

Contents?: true

Size: 666 Bytes

Versions: 9

Compression:

Stored size: 666 Bytes

Contents

require "spec_helper"

describe Webdrivers::MSWebdriver do

  let(:mswebdriver) { Webdrivers::MSWebdriver }

  it 'downloads mswebdriver' do
    mswebdriver.remove
    allow(mswebdriver).to receive(:current).and_return(0)
    expect(File.exist?(mswebdriver.download)).to be true
  end

  it 'removes mswebdriver' do
    mswebdriver.remove
    expect(File.exist?(mswebdriver.send :binary)).to be false
  end

  context 'when offline' do
    before { allow(mswebdriver).to receive(:site_available?).and_return(false) }

    it 'raises exception downloading' do
      expect {mswebdriver.download}.to raise_error(StandardError, "Can not reach site")
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
webdrivers-3.2.4 spec/mswebdriver_spec.rb
webdrivers-3.2.3 spec/mswebdriver_spec.rb
webdrivers-3.2.2 spec/mswebdriver_spec.rb
webdrivers-3.2.1 spec/mswebdriver_spec.rb
webdrivers-3.2.0 spec/mswebdriver_spec.rb
webdrivers-3.1.0 spec/mswebdriver_spec.rb
webdrivers-3.0.1 spec/mswebdriver_spec.rb
webdrivers-3.0.0 spec/mswebdriver_spec.rb
webdrivers-3.0.0.beta3 spec/mswebdriver_spec.rb