Sha256: aece17f38f578d635ec868f727e64ea0dc671e1b6acbb9097efce6d3310817f9

Contents?: true

Size: 727 Bytes

Versions: 2

Compression:

Stored size: 727 Bytes

Contents

require "spec_helper"

describe Webdrivers::MSWebdriver do

  let(:mswebdriver) { Webdrivers::MSWebdriver }

  it 'downloads mswebdriver' do
    mswebdriver.remove
    allow(mswebdriver).to receive(:desired_version).and_return(mswebdriver.latest_version)
    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

2 entries across 2 versions & 1 rubygems

Version Path
webdrivers-3.7.1 spec/mswebdriver_spec.rb
webdrivers-3.7.0 spec/mswebdriver_spec.rb