geckodriver-helper 0.0.5 → 0.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/geckodriver-helper.gemspec +1 -0
- data/lib/geckodriver/helper.rb +23 -15
- data/lib/geckodriver/helper/version.rb +1 -1
- data/spec/helper_spec.rb +29 -4
- metadata +16 -7
- data/lib/geckodriver/helper/gecko_release_page_parser.rb +0 -35
- data/spec/assets/gecko-releases.json +0 -1
- data/spec/gecko_release_page_parser_spec.rb +0 -26
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Geckodriver::Helper::GeckoReleasePageParser do
|
4
|
-
|
5
|
-
let!(:data) do
|
6
|
-
file = File.read(File.join(File.dirname(__FILE__), 'assets/gecko-releases.json'))
|
7
|
-
JSON.parse(file)
|
8
|
-
end
|
9
|
-
|
10
|
-
describe '#download_url' do
|
11
|
-
%w(mac linux32 linux64 win).each do |platform|
|
12
|
-
|
13
|
-
it "returns correspond URL for the #{platform} platform" do
|
14
|
-
parser = Geckodriver::Helper::GeckoReleasePageParser.new(platform)
|
15
|
-
case platform
|
16
|
-
when 'mac' then file = 'macos.tar.gz'
|
17
|
-
when 'linux32' then file = 'linux32.tar.gz'
|
18
|
-
when 'linux64' then file = 'linux64.tar.gz'
|
19
|
-
when 'win' then file = 'win32.zip'
|
20
|
-
else raise "#{platform} is not supported"
|
21
|
-
end
|
22
|
-
expect(parser.download_url(data)).to eq "https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-#{file}"
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|