webdrivers 4.5.0 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/LICENSE.txt +0 -0
  4. data/README.md +25 -19
  5. data/lib/webdrivers.rb +0 -0
  6. data/lib/webdrivers/Rakefile +0 -0
  7. data/lib/webdrivers/chrome_finder.rb +0 -0
  8. data/lib/webdrivers/chromedriver.rb +0 -0
  9. data/lib/webdrivers/common.rb +0 -0
  10. data/lib/webdrivers/edge_finder.rb +6 -6
  11. data/lib/webdrivers/edgedriver.rb +1 -16
  12. data/lib/webdrivers/geckodriver.rb +0 -0
  13. data/lib/webdrivers/iedriver.rb +0 -0
  14. data/lib/webdrivers/logger.rb +0 -0
  15. data/lib/webdrivers/network.rb +0 -0
  16. data/lib/webdrivers/railtie.rb +0 -0
  17. data/lib/webdrivers/system.rb +0 -0
  18. data/lib/webdrivers/tasks/chromedriver.rake +0 -0
  19. data/lib/webdrivers/tasks/edgedriver.rake +0 -0
  20. data/lib/webdrivers/tasks/geckodriver.rake +0 -0
  21. data/lib/webdrivers/tasks/iedriver.rake +0 -0
  22. data/lib/webdrivers/version.rb +1 -1
  23. data/spec/spec_helper.rb +0 -0
  24. data/spec/webdrivers/chrome_finder_spec.rb +0 -0
  25. data/spec/webdrivers/chromedriver_spec.rb +0 -0
  26. data/spec/webdrivers/edge_finder_spec.rb +9 -11
  27. data/spec/webdrivers/edgedriver_spec.rb +1 -3
  28. data/spec/webdrivers/geckodriver_spec.rb +0 -0
  29. data/spec/webdrivers/i_edriver_spec.rb +0 -0
  30. data/spec/webdrivers/system_spec.rb +0 -0
  31. data/spec/webdrivers/webdrivers_spec.rb +0 -0
  32. data/spec/webdrivers_proxy_support_spec.rb +0 -0
  33. metadata +9 -59
  34. data/spec/webdrivers/coverage/assets/0.10.2/application.css +0 -799
  35. data/spec/webdrivers/coverage/assets/0.10.2/application.js +0 -1707
  36. data/spec/webdrivers/coverage/assets/0.10.2/colorbox/border.png +0 -0
  37. data/spec/webdrivers/coverage/assets/0.10.2/colorbox/controls.png +0 -0
  38. data/spec/webdrivers/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
  39. data/spec/webdrivers/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
  40. data/spec/webdrivers/coverage/assets/0.10.2/favicon_green.png +0 -0
  41. data/spec/webdrivers/coverage/assets/0.10.2/favicon_red.png +0 -0
  42. data/spec/webdrivers/coverage/assets/0.10.2/favicon_yellow.png +0 -0
  43. data/spec/webdrivers/coverage/assets/0.10.2/loading.gif +0 -0
  44. data/spec/webdrivers/coverage/assets/0.10.2/magnify.png +0 -0
  45. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  46. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  47. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  48. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  49. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  50. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  51. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  52. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  53. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
  54. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  55. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
  56. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
  57. data/spec/webdrivers/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  58. data/spec/webdrivers/coverage/index.html +0 -3512
@@ -1,3512 +0,0 @@
1
- <!DOCTYPE html>
2
- <html xmlns='http://www.w3.org/1999/xhtml'>
3
- <head>
4
- <title>Code coverage for Webdrivers</title>
5
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
- <script src='./assets/0.10.2/application.js' type='text/javascript'></script>
7
- <link href='./assets/0.10.2/application.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
8
- <link rel="shortcut icon" type="image/png" href="./assets/0.10.2/favicon_red.png" />
9
- <link rel="icon" type="image/png" href="./assets/0.10.2/favicon.png" />
10
- </head>
11
-
12
- <body>
13
- <div id="loading">
14
- <img src="./assets/0.10.2/loading.gif" alt="loading"/>
15
- </div>
16
- <div id="wrapper" style="display:none;">
17
- <div class="timestamp">Generated <abbr class="timeago" title="2019-06-18T23:50:37-07:00">2019-06-18T23:50:37-07:00</abbr></div>
18
- <ul class="group_tabs"></ul>
19
-
20
- <div id="content">
21
- <div class="file_list_container" id="AllFiles">
22
- <h2>
23
- <span class="group_name">All Files</span>
24
- (<span class="covered_percent"><span class="red">35.97%</span></span>
25
- covered at
26
- <span class="covered_strength">
27
- <span class="red">
28
- 0.35
29
- </span>
30
- </span> hits/line)
31
- </h2>
32
- <a name="AllFiles"></a>
33
- <div>
34
- <b>4</b> files in total.
35
- <b>303</b> relevant lines.
36
- <span class="green"><b>109</b> lines covered</span> and
37
- <span class="red"><b>194</b> lines missed </span>
38
- </div>
39
- <table class="file_list">
40
- <thead>
41
- <tr>
42
- <th>File</th>
43
- <th>% covered</th>
44
- <th>Lines</th>
45
- <th>Relevant Lines</th>
46
- <th>Lines covered</th>
47
- <th>Lines missed</th>
48
- <th>Avg. Hits / Line</th>
49
- </tr>
50
- </thead>
51
- <tbody>
52
-
53
- <tr>
54
- <td class="strong"><a href="#1eeae7c2bcf190fc2536cb4cc293c2b4daa7ac74" class="src_link" title="chrome_finder_spec.rb">chrome_finder_spec.rb</a></td>
55
- <td class="red strong">24.44 %</td>
56
- <td>63</td>
57
- <td>45</td>
58
- <td>11</td>
59
- <td>34</td>
60
- <td>0.2</td>
61
- </tr>
62
-
63
- <tr>
64
- <td class="strong"><a href="#354a08a4de4857a0eb19e440d8bb89dd535e2de7" class="src_link" title="geckodriver_spec.rb">geckodriver_spec.rb</a></td>
65
- <td class="red strong">33.93 %</td>
66
- <td>212</td>
67
- <td>112</td>
68
- <td>38</td>
69
- <td>74</td>
70
- <td>0.3</td>
71
- </tr>
72
-
73
- <tr>
74
- <td class="strong"><a href="#b110b0bbf560886b04eeeb0a2599ab32bd56891f" class="src_link" title="i_edriver_spec.rb">i_edriver_spec.rb</a></td>
75
- <td class="red strong">35.92 %</td>
76
- <td>193</td>
77
- <td>103</td>
78
- <td>37</td>
79
- <td>66</td>
80
- <td>0.4</td>
81
- </tr>
82
-
83
- <tr>
84
- <td class="strong"><a href="#bb23367ebba321ca72c763483bfad18fec31566e" class="src_link" title="webdrivers_spec.rb">webdrivers_spec.rb</a></td>
85
- <td class="red strong">53.49 %</td>
86
- <td>86</td>
87
- <td>43</td>
88
- <td>23</td>
89
- <td>20</td>
90
- <td>0.5</td>
91
- </tr>
92
-
93
- </tbody>
94
- </table>
95
- </div>
96
-
97
-
98
-
99
- </div>
100
-
101
- <div id="footer">
102
- Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.16.1
103
- and simplecov-html v0.10.2<br/>
104
- using RSpec
105
- </div>
106
-
107
- <div class="source_files">
108
-
109
- <div class="source_table" id="1eeae7c2bcf190fc2536cb4cc293c2b4daa7ac74">
110
- <div class="header">
111
- <h3>chrome_finder_spec.rb</h3>
112
- <h4><span class="red">24.44 %</span> covered</h4>
113
- <div>
114
- <b>45</b> relevant lines.
115
- <span class="green"><b>11</b> lines covered</span> and
116
- <span class="red"><b>34</b> lines missed.</span>
117
- </div>
118
- </div>
119
-
120
- <pre>
121
- <ol>
122
-
123
- <li class="never" data-hits="" data-linenumber="1">
124
-
125
-
126
- <code class="ruby"># frozen_string_literal: true</code>
127
- </li>
128
-
129
- <li class="never" data-hits="" data-linenumber="2">
130
-
131
-
132
- <code class="ruby"></code>
133
- </li>
134
-
135
- <li class="covered" data-hits="1" data-linenumber="3">
136
- <span class="hits">1</span>
137
-
138
- <code class="ruby">require &#39;../spec_helper&#39;</code>
139
- </li>
140
-
141
- <li class="never" data-hits="" data-linenumber="4">
142
-
143
-
144
- <code class="ruby"></code>
145
- </li>
146
-
147
- <li class="covered" data-hits="1" data-linenumber="5">
148
- <span class="hits">1</span>
149
-
150
- <code class="ruby">describe Webdrivers::ChromeFinder do</code>
151
- </li>
152
-
153
- <li class="covered" data-hits="1" data-linenumber="6">
154
- <span class="hits">1</span>
155
-
156
- <code class="ruby"> let(:chrome_finder) { described_class }</code>
157
- </li>
158
-
159
- <li class="never" data-hits="" data-linenumber="7">
160
-
161
-
162
- <code class="ruby"></code>
163
- </li>
164
-
165
- <li class="covered" data-hits="1" data-linenumber="8">
166
- <span class="hits">1</span>
167
-
168
- <code class="ruby"> context &#39;when the user relies on the gem to figure out the location of Chrome&#39; do</code>
169
- </li>
170
-
171
- <li class="covered" data-hits="1" data-linenumber="9">
172
- <span class="hits">1</span>
173
-
174
- <code class="ruby"> it &#39;determines the location correctly based on the current OS&#39; do</code>
175
- </li>
176
-
177
- <li class="missed" data-hits="0" data-linenumber="10">
178
-
179
-
180
- <code class="ruby"> expect(chrome_finder.send(&quot;#{Webdrivers::System.platform}_location&quot;)).not_to be_nil</code>
181
- </li>
182
-
183
- <li class="never" data-hits="" data-linenumber="11">
184
-
185
-
186
- <code class="ruby"> end</code>
187
- </li>
188
-
189
- <li class="never" data-hits="" data-linenumber="12">
190
-
191
-
192
- <code class="ruby"> end</code>
193
- </li>
194
-
195
- <li class="never" data-hits="" data-linenumber="13">
196
-
197
-
198
- <code class="ruby"></code>
199
- </li>
200
-
201
- <li class="covered" data-hits="1" data-linenumber="14">
202
- <span class="hits">1</span>
203
-
204
- <code class="ruby"> context &#39;when user provides a path to the Chrome binary&#39; do</code>
205
- </li>
206
-
207
- <li class="covered" data-hits="1" data-linenumber="15">
208
- <span class="hits">1</span>
209
-
210
- <code class="ruby"> it &#39;uses Selenium::WebDriver::Chrome.path when it is defined&#39; do</code>
211
- </li>
212
-
213
- <li class="missed" data-hits="0" data-linenumber="16">
214
-
215
-
216
- <code class="ruby"> Selenium::WebDriver::Chrome.path = chrome_finder.send(&quot;#{Webdrivers::System.platform}_location&quot;)</code>
217
- </li>
218
-
219
- <li class="missed" data-hits="0" data-linenumber="17">
220
-
221
-
222
- <code class="ruby"> allow(chrome_finder).to receive(:win_location)</code>
223
- </li>
224
-
225
- <li class="missed" data-hits="0" data-linenumber="18">
226
-
227
-
228
- <code class="ruby"> allow(chrome_finder).to receive(:mac_location)</code>
229
- </li>
230
-
231
- <li class="missed" data-hits="0" data-linenumber="19">
232
-
233
-
234
- <code class="ruby"> allow(chrome_finder).to receive(:linux_location)</code>
235
- </li>
236
-
237
- <li class="missed" data-hits="0" data-linenumber="20">
238
-
239
-
240
- <code class="ruby"> chrome_finder.version</code>
241
- </li>
242
-
243
- <li class="missed" data-hits="0" data-linenumber="21">
244
-
245
-
246
- <code class="ruby"> expect(chrome_finder).not_to have_received(:win_location)</code>
247
- </li>
248
-
249
- <li class="missed" data-hits="0" data-linenumber="22">
250
-
251
-
252
- <code class="ruby"> expect(chrome_finder).not_to have_received(:mac_location)</code>
253
- </li>
254
-
255
- <li class="missed" data-hits="0" data-linenumber="23">
256
-
257
-
258
- <code class="ruby"> expect(chrome_finder).not_to have_received(:linux_location)</code>
259
- </li>
260
-
261
- <li class="never" data-hits="" data-linenumber="24">
262
-
263
-
264
- <code class="ruby"> end</code>
265
- </li>
266
-
267
- <li class="never" data-hits="" data-linenumber="25">
268
-
269
-
270
- <code class="ruby"></code>
271
- </li>
272
-
273
- <li class="covered" data-hits="1" data-linenumber="26">
274
- <span class="hits">1</span>
275
-
276
- <code class="ruby"> it &quot;uses ENV[&#39;WD_CHROME_PATH&#39;] when it is defined&quot; do</code>
277
- </li>
278
-
279
- <li class="missed" data-hits="0" data-linenumber="27">
280
-
281
-
282
- <code class="ruby"> loc_method = &quot;#{Webdrivers::System.platform}_location&quot;</code>
283
- </li>
284
-
285
- <li class="missed" data-hits="0" data-linenumber="28">
286
-
287
-
288
- <code class="ruby"> allow(ENV).to receive(:[]).with(&#39;WD_CHROME_PATH&#39;).and_return(chrome_finder.send(loc_method))</code>
289
- </li>
290
-
291
- <li class="missed" data-hits="0" data-linenumber="29">
292
-
293
-
294
- <code class="ruby"> allow(chrome_finder).to receive(:win_location)</code>
295
- </li>
296
-
297
- <li class="missed" data-hits="0" data-linenumber="30">
298
-
299
-
300
- <code class="ruby"> allow(chrome_finder).to receive(:mac_location)</code>
301
- </li>
302
-
303
- <li class="missed" data-hits="0" data-linenumber="31">
304
-
305
-
306
- <code class="ruby"> allow(chrome_finder).to receive(:linux_location)</code>
307
- </li>
308
-
309
- <li class="missed" data-hits="0" data-linenumber="32">
310
-
311
-
312
- <code class="ruby"> chrome_finder.version</code>
313
- </li>
314
-
315
- <li class="missed" data-hits="0" data-linenumber="33">
316
-
317
-
318
- <code class="ruby"> expect(chrome_finder).not_to have_received(:win_location)</code>
319
- </li>
320
-
321
- <li class="missed" data-hits="0" data-linenumber="34">
322
-
323
-
324
- <code class="ruby"> expect(chrome_finder).not_to have_received(:mac_location)</code>
325
- </li>
326
-
327
- <li class="missed" data-hits="0" data-linenumber="35">
328
-
329
-
330
- <code class="ruby"> expect(chrome_finder).not_to have_received(:linux_location)</code>
331
- </li>
332
-
333
- <li class="never" data-hits="" data-linenumber="36">
334
-
335
-
336
- <code class="ruby"> end</code>
337
- </li>
338
-
339
- <li class="never" data-hits="" data-linenumber="37">
340
-
341
-
342
- <code class="ruby"></code>
343
- </li>
344
-
345
- <li class="covered" data-hits="1" data-linenumber="38">
346
- <span class="hits">1</span>
347
-
348
- <code class="ruby"> it &#39;uses Selenium::WebDriver::Chrome.path over WD_CHROME_PATH&#39; do</code>
349
- </li>
350
-
351
- <li class="missed" data-hits="0" data-linenumber="39">
352
-
353
-
354
- <code class="ruby"> loc = chrome_finder.send(&quot;#{Webdrivers::System.platform}_location&quot;)</code>
355
- </li>
356
-
357
- <li class="missed" data-hits="0" data-linenumber="40">
358
-
359
-
360
- <code class="ruby"> allow(ENV).to receive(:[]).with(&#39;WD_CHROME_PATH&#39;).and_return(&#39;my_wd_chrome_path&#39;)</code>
361
- </li>
362
-
363
- <li class="missed" data-hits="0" data-linenumber="41">
364
-
365
-
366
- <code class="ruby"> Selenium::WebDriver::Chrome.path = loc</code>
367
- </li>
368
-
369
- <li class="missed" data-hits="0" data-linenumber="42">
370
-
371
-
372
- <code class="ruby"> chrome_finder.version</code>
373
- </li>
374
-
375
- <li class="missed" data-hits="0" data-linenumber="43">
376
-
377
-
378
- <code class="ruby"> expect(ENV).not_to have_received(:[]).with(&#39;WD_CHROME_PATH&#39;)</code>
379
- </li>
380
-
381
- <li class="never" data-hits="" data-linenumber="44">
382
-
383
-
384
- <code class="ruby"> end</code>
385
- </li>
386
-
387
- <li class="never" data-hits="" data-linenumber="45">
388
-
389
-
390
- <code class="ruby"></code>
391
- </li>
392
-
393
- <li class="covered" data-hits="1" data-linenumber="46">
394
- <span class="hits">1</span>
395
-
396
- <code class="ruby"> it &#39;escapes the user given Chrome path&#39; do</code>
397
- </li>
398
-
399
- <li class="missed" data-hits="0" data-linenumber="47">
400
-
401
-
402
- <code class="ruby"> platform = Webdrivers::System.platform</code>
403
- </li>
404
-
405
- <li class="missed" data-hits="0" data-linenumber="48">
406
-
407
-
408
- <code class="ruby"> loc = chrome_finder.send(&quot;#{platform}_location&quot;)</code>
409
- </li>
410
-
411
- <li class="missed" data-hits="0" data-linenumber="49">
412
-
413
-
414
- <code class="ruby"> loc = loc.gsub(/([\s()])/, &#39;`\1&#39;) if using_jruby_on_windows?</code>
415
- </li>
416
-
417
- <li class="missed" data-hits="0" data-linenumber="50">
418
-
419
-
420
- <code class="ruby"> allow(Webdrivers::System).to receive(:escape_path).with(loc).and_return(Webdrivers::System.escape_path(loc))</code>
421
- </li>
422
-
423
- <li class="missed" data-hits="0" data-linenumber="51">
424
-
425
-
426
- <code class="ruby"> chrome_finder.send(&quot;#{platform}_version&quot;, loc)</code>
427
- </li>
428
-
429
- <li class="missed" data-hits="0" data-linenumber="52">
430
-
431
-
432
- <code class="ruby"> expect(Webdrivers::System).to have_received(:escape_path).with(loc)</code>
433
- </li>
434
-
435
- <li class="never" data-hits="" data-linenumber="53">
436
-
437
-
438
- <code class="ruby"> end</code>
439
- </li>
440
-
441
- <li class="never" data-hits="" data-linenumber="54">
442
-
443
-
444
- <code class="ruby"></code>
445
- </li>
446
-
447
- <li class="covered" data-hits="1" data-linenumber="55">
448
- <span class="hits">1</span>
449
-
450
- <code class="ruby"> it &#39;properly escapes the Chrome path when using JRuby on Windows&#39;, if: using_jruby_on_windows? do</code>
451
- </li>
452
-
453
- <li class="missed" data-hits="0" data-linenumber="56">
454
-
455
-
456
- <code class="ruby"> allow(String).to receive(:gsub)</code>
457
- </li>
458
-
459
- <li class="missed" data-hits="0" data-linenumber="57">
460
-
461
-
462
- <code class="ruby"> platform = Webdrivers::System.platform</code>
463
- </li>
464
-
465
- <li class="missed" data-hits="0" data-linenumber="58">
466
-
467
-
468
- <code class="ruby"> loc = chrome_finder.send(&quot;#{platform}_location&quot;)</code>
469
- </li>
470
-
471
- <li class="missed" data-hits="0" data-linenumber="59">
472
-
473
-
474
- <code class="ruby"> chrome_finder.send(&quot;#{platform}_version&quot;, loc)</code>
475
- </li>
476
-
477
- <li class="missed" data-hits="0" data-linenumber="60">
478
-
479
-
480
- <code class="ruby"> expect(String).to have_received(:gsub).with(/([\s()])/, &#39;`\1&#39;)</code>
481
- </li>
482
-
483
- <li class="never" data-hits="" data-linenumber="61">
484
-
485
-
486
- <code class="ruby"> end</code>
487
- </li>
488
-
489
- <li class="never" data-hits="" data-linenumber="62">
490
-
491
-
492
- <code class="ruby"> end</code>
493
- </li>
494
-
495
- <li class="never" data-hits="" data-linenumber="63">
496
-
497
-
498
- <code class="ruby">end</code>
499
- </li>
500
-
501
- </ol>
502
- </pre>
503
- </div>
504
-
505
-
506
- <div class="source_table" id="354a08a4de4857a0eb19e440d8bb89dd535e2de7">
507
- <div class="header">
508
- <h3>geckodriver_spec.rb</h3>
509
- <h4><span class="red">33.93 %</span> covered</h4>
510
- <div>
511
- <b>112</b> relevant lines.
512
- <span class="green"><b>38</b> lines covered</span> and
513
- <span class="red"><b>74</b> lines missed.</span>
514
- </div>
515
- </div>
516
-
517
- <pre>
518
- <ol>
519
-
520
- <li class="never" data-hits="" data-linenumber="1">
521
-
522
-
523
- <code class="ruby"># frozen_string_literal: true</code>
524
- </li>
525
-
526
- <li class="never" data-hits="" data-linenumber="2">
527
-
528
-
529
- <code class="ruby"></code>
530
- </li>
531
-
532
- <li class="covered" data-hits="1" data-linenumber="3">
533
- <span class="hits">1</span>
534
-
535
- <code class="ruby">require &#39;../spec_helper&#39;</code>
536
- </li>
537
-
538
- <li class="never" data-hits="" data-linenumber="4">
539
-
540
-
541
- <code class="ruby"></code>
542
- </li>
543
-
544
- <li class="covered" data-hits="1" data-linenumber="5">
545
- <span class="hits">1</span>
546
-
547
- <code class="ruby">describe Webdrivers::Geckodriver do</code>
548
- </li>
549
-
550
- <li class="covered" data-hits="1" data-linenumber="6">
551
- <span class="hits">1</span>
552
-
553
- <code class="ruby"> let(:geckodriver) { described_class }</code>
554
- </li>
555
-
556
- <li class="never" data-hits="" data-linenumber="7">
557
-
558
-
559
- <code class="ruby"></code>
560
- </li>
561
-
562
- <li class="covered" data-hits="1" data-linenumber="8">
563
- <span class="hits">1</span>
564
-
565
- <code class="ruby"> before do</code>
566
- </li>
567
-
568
- <li class="missed" data-hits="0" data-linenumber="9">
569
-
570
-
571
- <code class="ruby"> geckodriver.remove</code>
572
- </li>
573
-
574
- <li class="missed" data-hits="0" data-linenumber="10">
575
-
576
-
577
- <code class="ruby"> geckodriver.required_version = nil</code>
578
- </li>
579
-
580
- <li class="never" data-hits="" data-linenumber="11">
581
-
582
-
583
- <code class="ruby"> end</code>
584
- </li>
585
-
586
- <li class="never" data-hits="" data-linenumber="12">
587
-
588
-
589
- <code class="ruby"></code>
590
- </li>
591
-
592
- <li class="covered" data-hits="1" data-linenumber="13">
593
- <span class="hits">1</span>
594
-
595
- <code class="ruby"> describe &#39;#update&#39; do</code>
596
- </li>
597
-
598
- <li class="covered" data-hits="1" data-linenumber="14">
599
- <span class="hits">1</span>
600
-
601
- <code class="ruby"> context &#39;when evaluating #correct_binary?&#39; do</code>
602
- </li>
603
-
604
- <li class="covered" data-hits="1" data-linenumber="15">
605
- <span class="hits">1</span>
606
-
607
- <code class="ruby"> it &#39;does not download when latest version and current version match&#39; do</code>
608
- </li>
609
-
610
- <li class="missed" data-hits="0" data-linenumber="16">
611
-
612
-
613
- <code class="ruby"> allow(geckodriver).to receive(:latest_version).and_return(Gem::Version.new(&#39;0.3.0&#39;))</code>
614
- </li>
615
-
616
- <li class="missed" data-hits="0" data-linenumber="17">
617
-
618
-
619
- <code class="ruby"> allow(geckodriver).to receive(:current_version).and_return(Gem::Version.new(&#39;0.3.0&#39;))</code>
620
- </li>
621
-
622
- <li class="never" data-hits="" data-linenumber="18">
623
-
624
-
625
- <code class="ruby"></code>
626
- </li>
627
-
628
- <li class="missed" data-hits="0" data-linenumber="19">
629
-
630
-
631
- <code class="ruby"> geckodriver.update</code>
632
- </li>
633
-
634
- <li class="never" data-hits="" data-linenumber="20">
635
-
636
-
637
- <code class="ruby"></code>
638
- </li>
639
-
640
- <li class="missed" data-hits="0" data-linenumber="21">
641
-
642
-
643
- <code class="ruby"> expect(geckodriver.send(:exists?)).to be false</code>
644
- </li>
645
-
646
- <li class="never" data-hits="" data-linenumber="22">
647
-
648
-
649
- <code class="ruby"> end</code>
650
- </li>
651
-
652
- <li class="never" data-hits="" data-linenumber="23">
653
-
654
-
655
- <code class="ruby"></code>
656
- </li>
657
-
658
- <li class="covered" data-hits="1" data-linenumber="24">
659
- <span class="hits">1</span>
660
-
661
- <code class="ruby"> it &#39;does not download when offline, but binary exists&#39; do</code>
662
- </li>
663
-
664
- <li class="missed" data-hits="0" data-linenumber="25">
665
-
666
-
667
- <code class="ruby"> allow(Webdrivers::System).to receive(:call).and_return(&#39;geckodriver 0.24.0 ( 2019-01-28)&#39;)</code>
668
- </li>
669
-
670
- <li class="missed" data-hits="0" data-linenumber="26">
671
-
672
-
673
- <code class="ruby"> allow(Net::HTTP).to receive(:get_response).and_raise(SocketError)</code>
674
- </li>
675
-
676
- <li class="missed" data-hits="0" data-linenumber="27">
677
-
678
-
679
- <code class="ruby"> allow(geckodriver).to receive(:exists?).and_return(true)</code>
680
- </li>
681
-
682
- <li class="never" data-hits="" data-linenumber="28">
683
-
684
-
685
- <code class="ruby"></code>
686
- </li>
687
-
688
- <li class="missed" data-hits="0" data-linenumber="29">
689
-
690
-
691
- <code class="ruby"> geckodriver.update</code>
692
- </li>
693
-
694
- <li class="never" data-hits="" data-linenumber="30">
695
-
696
-
697
- <code class="ruby"></code>
698
- </li>
699
-
700
- <li class="missed" data-hits="0" data-linenumber="31">
701
-
702
-
703
- <code class="ruby"> expect(File.exist?(geckodriver.driver_path)).to be false</code>
704
- </li>
705
-
706
- <li class="never" data-hits="" data-linenumber="32">
707
-
708
-
709
- <code class="ruby"> end</code>
710
- </li>
711
-
712
- <li class="never" data-hits="" data-linenumber="33">
713
-
714
-
715
- <code class="ruby"></code>
716
- </li>
717
-
718
- <li class="covered" data-hits="1" data-linenumber="34">
719
- <span class="hits">1</span>
720
-
721
- <code class="ruby"> it &#39;raises ConnectionError when offline, and no binary exists&#39; do</code>
722
- </li>
723
-
724
- <li class="missed" data-hits="0" data-linenumber="35">
725
-
726
-
727
- <code class="ruby"> allow(Net::HTTP).to receive(:get_response).and_raise(SocketError)</code>
728
- </li>
729
-
730
- <li class="missed" data-hits="0" data-linenumber="36">
731
-
732
-
733
- <code class="ruby"> allow(geckodriver).to receive(:exists?).and_return(false)</code>
734
- </li>
735
-
736
- <li class="never" data-hits="" data-linenumber="37">
737
-
738
-
739
- <code class="ruby"></code>
740
- </li>
741
-
742
- <li class="missed" data-hits="0" data-linenumber="38">
743
-
744
-
745
- <code class="ruby"> expect { geckodriver.update }.to raise_error(Webdrivers::ConnectionError)</code>
746
- </li>
747
-
748
- <li class="never" data-hits="" data-linenumber="39">
749
-
750
-
751
- <code class="ruby"> end</code>
752
- </li>
753
-
754
- <li class="never" data-hits="" data-linenumber="40">
755
-
756
-
757
- <code class="ruby"> end</code>
758
- </li>
759
-
760
- <li class="never" data-hits="" data-linenumber="41">
761
-
762
-
763
- <code class="ruby"></code>
764
- </li>
765
-
766
- <li class="covered" data-hits="1" data-linenumber="42">
767
- <span class="hits">1</span>
768
-
769
- <code class="ruby"> context &#39;when correct binary is found&#39; do</code>
770
- </li>
771
-
772
- <li class="covered" data-hits="1" data-linenumber="43">
773
- <span class="hits">1</span>
774
-
775
- <code class="ruby"> before { allow(geckodriver).to receive(:correct_binary?).and_return(true) }</code>
776
- </li>
777
-
778
- <li class="never" data-hits="" data-linenumber="44">
779
-
780
-
781
- <code class="ruby"></code>
782
- </li>
783
-
784
- <li class="covered" data-hits="1" data-linenumber="45">
785
- <span class="hits">1</span>
786
-
787
- <code class="ruby"> it &#39;does not download&#39; do</code>
788
- </li>
789
-
790
- <li class="missed" data-hits="0" data-linenumber="46">
791
-
792
-
793
- <code class="ruby"> geckodriver.update</code>
794
- </li>
795
-
796
- <li class="never" data-hits="" data-linenumber="47">
797
-
798
-
799
- <code class="ruby"></code>
800
- </li>
801
-
802
- <li class="missed" data-hits="0" data-linenumber="48">
803
-
804
-
805
- <code class="ruby"> expect(geckodriver.current_version).to be_nil</code>
806
- </li>
807
-
808
- <li class="never" data-hits="" data-linenumber="49">
809
-
810
-
811
- <code class="ruby"> end</code>
812
- </li>
813
-
814
- <li class="never" data-hits="" data-linenumber="50">
815
-
816
-
817
- <code class="ruby"></code>
818
- </li>
819
-
820
- <li class="covered" data-hits="1" data-linenumber="51">
821
- <span class="hits">1</span>
822
-
823
- <code class="ruby"> it &#39;does not raise exception if offline&#39; do</code>
824
- </li>
825
-
826
- <li class="missed" data-hits="0" data-linenumber="52">
827
-
828
-
829
- <code class="ruby"> allow(Net::HTTP).to receive(:get_response).and_raise(SocketError)</code>
830
- </li>
831
-
832
- <li class="never" data-hits="" data-linenumber="53">
833
-
834
-
835
- <code class="ruby"></code>
836
- </li>
837
-
838
- <li class="missed" data-hits="0" data-linenumber="54">
839
-
840
-
841
- <code class="ruby"> geckodriver.update</code>
842
- </li>
843
-
844
- <li class="never" data-hits="" data-linenumber="55">
845
-
846
-
847
- <code class="ruby"></code>
848
- </li>
849
-
850
- <li class="missed" data-hits="0" data-linenumber="56">
851
-
852
-
853
- <code class="ruby"> expect(geckodriver.current_version).to be_nil</code>
854
- </li>
855
-
856
- <li class="never" data-hits="" data-linenumber="57">
857
-
858
-
859
- <code class="ruby"> end</code>
860
- </li>
861
-
862
- <li class="never" data-hits="" data-linenumber="58">
863
-
864
-
865
- <code class="ruby"> end</code>
866
- </li>
867
-
868
- <li class="never" data-hits="" data-linenumber="59">
869
-
870
-
871
- <code class="ruby"></code>
872
- </li>
873
-
874
- <li class="covered" data-hits="1" data-linenumber="60">
875
- <span class="hits">1</span>
876
-
877
- <code class="ruby"> context &#39;when correct binary is not found&#39; do</code>
878
- </li>
879
-
880
- <li class="covered" data-hits="1" data-linenumber="61">
881
- <span class="hits">1</span>
882
-
883
- <code class="ruby"> before { allow(geckodriver).to receive(:correct_binary?).and_return(false) }</code>
884
- </li>
885
-
886
- <li class="never" data-hits="" data-linenumber="62">
887
-
888
-
889
- <code class="ruby"></code>
890
- </li>
891
-
892
- <li class="covered" data-hits="1" data-linenumber="63">
893
- <span class="hits">1</span>
894
-
895
- <code class="ruby"> it &#39;downloads binary&#39; do</code>
896
- </li>
897
-
898
- <li class="missed" data-hits="0" data-linenumber="64">
899
-
900
-
901
- <code class="ruby"> geckodriver.update</code>
902
- </li>
903
-
904
- <li class="never" data-hits="" data-linenumber="65">
905
-
906
-
907
- <code class="ruby"></code>
908
- </li>
909
-
910
- <li class="missed" data-hits="0" data-linenumber="66">
911
-
912
-
913
- <code class="ruby"> expect(geckodriver.current_version).not_to be_nil</code>
914
- </li>
915
-
916
- <li class="never" data-hits="" data-linenumber="67">
917
-
918
-
919
- <code class="ruby"> end</code>
920
- </li>
921
-
922
- <li class="never" data-hits="" data-linenumber="68">
923
-
924
-
925
- <code class="ruby"></code>
926
- </li>
927
-
928
- <li class="covered" data-hits="1" data-linenumber="69">
929
- <span class="hits">1</span>
930
-
931
- <code class="ruby"> it &#39;raises ConnectionError if offline&#39; do</code>
932
- </li>
933
-
934
- <li class="missed" data-hits="0" data-linenumber="70">
935
-
936
-
937
- <code class="ruby"> allow(Net::HTTP).to receive(:get_response).and_raise(SocketError)</code>
938
- </li>
939
-
940
- <li class="never" data-hits="" data-linenumber="71">
941
-
942
-
943
- <code class="ruby"></code>
944
- </li>
945
-
946
- <li class="missed" data-hits="0" data-linenumber="72">
947
-
948
-
949
- <code class="ruby"> msg = %r{Can not reach https://github.com/mozilla/geckodriver/releases}</code>
950
- </li>
951
-
952
- <li class="missed" data-hits="0" data-linenumber="73">
953
-
954
-
955
- <code class="ruby"> expect { geckodriver.update }.to raise_error(Webdrivers::ConnectionError, msg)</code>
956
- </li>
957
-
958
- <li class="never" data-hits="" data-linenumber="74">
959
-
960
-
961
- <code class="ruby"> end</code>
962
- </li>
963
-
964
- <li class="never" data-hits="" data-linenumber="75">
965
-
966
-
967
- <code class="ruby"> end</code>
968
- </li>
969
-
970
- <li class="never" data-hits="" data-linenumber="76">
971
-
972
-
973
- <code class="ruby"></code>
974
- </li>
975
-
976
- <li class="covered" data-hits="1" data-linenumber="77">
977
- <span class="hits">1</span>
978
-
979
- <code class="ruby"> it &#39;finds the required version from parsed downloads page&#39; do</code>
980
- </li>
981
-
982
- <li class="missed" data-hits="0" data-linenumber="78">
983
-
984
-
985
- <code class="ruby"> base = &#39;https://github.com/mozilla/geckodriver/releases/download&#39;</code>
986
- </li>
987
-
988
- <li class="missed" data-hits="0" data-linenumber="79">
989
-
990
-
991
- <code class="ruby"> url = %r{#{base}\/v0\.2\.0\/geckodriver-v0\.2\.0-}</code>
992
- </li>
993
-
994
- <li class="never" data-hits="" data-linenumber="80">
995
-
996
-
997
- <code class="ruby"></code>
998
- </li>
999
-
1000
- <li class="missed" data-hits="0" data-linenumber="81">
1001
-
1002
-
1003
- <code class="ruby"> allow(Webdrivers::System).to receive(:download).with(url, geckodriver.driver_path)</code>
1004
- </li>
1005
-
1006
- <li class="never" data-hits="" data-linenumber="82">
1007
-
1008
-
1009
- <code class="ruby"></code>
1010
- </li>
1011
-
1012
- <li class="missed" data-hits="0" data-linenumber="83">
1013
-
1014
-
1015
- <code class="ruby"> geckodriver.required_version = &#39;0.2.0&#39;</code>
1016
- </li>
1017
-
1018
- <li class="missed" data-hits="0" data-linenumber="84">
1019
-
1020
-
1021
- <code class="ruby"> geckodriver.update</code>
1022
- </li>
1023
-
1024
- <li class="never" data-hits="" data-linenumber="85">
1025
-
1026
-
1027
- <code class="ruby"></code>
1028
- </li>
1029
-
1030
- <li class="missed" data-hits="0" data-linenumber="86">
1031
-
1032
-
1033
- <code class="ruby"> expect(Webdrivers::System).to have_received(:download).with(url, geckodriver.driver_path)</code>
1034
- </li>
1035
-
1036
- <li class="never" data-hits="" data-linenumber="87">
1037
-
1038
-
1039
- <code class="ruby"> end</code>
1040
- </li>
1041
-
1042
- <li class="never" data-hits="" data-linenumber="88">
1043
-
1044
-
1045
- <code class="ruby"></code>
1046
- </li>
1047
-
1048
- <li class="covered" data-hits="1" data-linenumber="89">
1049
- <span class="hits">1</span>
1050
-
1051
- <code class="ruby"> it &#39;does something when a wrong version is supplied&#39; do</code>
1052
- </li>
1053
-
1054
- <li class="missed" data-hits="0" data-linenumber="90">
1055
-
1056
-
1057
- <code class="ruby"> geckodriver.required_version = &#39;0.2.0&#39;</code>
1058
- </li>
1059
-
1060
- <li class="never" data-hits="" data-linenumber="91">
1061
-
1062
-
1063
- <code class="ruby"></code>
1064
- </li>
1065
-
1066
- <li class="missed" data-hits="0" data-linenumber="92">
1067
-
1068
-
1069
- <code class="ruby"> msg = /Net::HTTPServerException: 404 &quot;Not Found&quot;/</code>
1070
- </li>
1071
-
1072
- <li class="missed" data-hits="0" data-linenumber="93">
1073
-
1074
-
1075
- <code class="ruby"> expect { geckodriver.update }.to raise_error(StandardError, msg)</code>
1076
- </li>
1077
-
1078
- <li class="never" data-hits="" data-linenumber="94">
1079
-
1080
-
1081
- <code class="ruby"> end</code>
1082
- </li>
1083
-
1084
- <li class="never" data-hits="" data-linenumber="95">
1085
-
1086
-
1087
- <code class="ruby"> end</code>
1088
- </li>
1089
-
1090
- <li class="never" data-hits="" data-linenumber="96">
1091
-
1092
-
1093
- <code class="ruby"></code>
1094
- </li>
1095
-
1096
- <li class="covered" data-hits="1" data-linenumber="97">
1097
- <span class="hits">1</span>
1098
-
1099
- <code class="ruby"> describe &#39;#current_version&#39; do</code>
1100
- </li>
1101
-
1102
- <li class="covered" data-hits="1" data-linenumber="98">
1103
- <span class="hits">1</span>
1104
-
1105
- <code class="ruby"> it &#39;returns nil if binary does not exist on the system&#39; do</code>
1106
- </li>
1107
-
1108
- <li class="missed" data-hits="0" data-linenumber="99">
1109
-
1110
-
1111
- <code class="ruby"> allow(geckodriver).to receive(:driver_path).and_return(&#39;&#39;)</code>
1112
- </li>
1113
-
1114
- <li class="never" data-hits="" data-linenumber="100">
1115
-
1116
-
1117
- <code class="ruby"></code>
1118
- </li>
1119
-
1120
- <li class="missed" data-hits="0" data-linenumber="101">
1121
-
1122
-
1123
- <code class="ruby"> expect(geckodriver.current_version).to be_nil</code>
1124
- </li>
1125
-
1126
- <li class="never" data-hits="" data-linenumber="102">
1127
-
1128
-
1129
- <code class="ruby"> end</code>
1130
- </li>
1131
-
1132
- <li class="never" data-hits="" data-linenumber="103">
1133
-
1134
-
1135
- <code class="ruby"></code>
1136
- </li>
1137
-
1138
- <li class="covered" data-hits="1" data-linenumber="104">
1139
- <span class="hits">1</span>
1140
-
1141
- <code class="ruby"> it &#39;returns a Gem::Version instance if binary is on the system&#39; do</code>
1142
- </li>
1143
-
1144
- <li class="missed" data-hits="0" data-linenumber="105">
1145
-
1146
-
1147
- <code class="ruby"> allow(geckodriver).to receive(:exists?).and_return(true)</code>
1148
- </li>
1149
-
1150
- <li class="never" data-hits="" data-linenumber="106">
1151
-
1152
-
1153
- <code class="ruby"></code>
1154
- </li>
1155
-
1156
- <li class="missed" data-hits="0" data-linenumber="107">
1157
-
1158
-
1159
- <code class="ruby"> return_value = &quot;geckodriver 0.24.0 ( 2019-01-28)</code>
1160
- </li>
1161
-
1162
- <li class="never" data-hits="" data-linenumber="108">
1163
-
1164
-
1165
- <code class="ruby"></code>
1166
- </li>
1167
-
1168
- <li class="never" data-hits="" data-linenumber="109">
1169
-
1170
-
1171
- <code class="ruby">The source code of this program is available from</code>
1172
- </li>
1173
-
1174
- <li class="never" data-hits="" data-linenumber="110">
1175
-
1176
-
1177
- <code class="ruby">testing/geckodriver in https://hg.mozilla.org/mozilla-central.</code>
1178
- </li>
1179
-
1180
- <li class="never" data-hits="" data-linenumber="111">
1181
-
1182
-
1183
- <code class="ruby"></code>
1184
- </li>
1185
-
1186
- <li class="never" data-hits="" data-linenumber="112">
1187
-
1188
-
1189
- <code class="ruby">This program is subject to the terms of the Mozilla Public License 2.0.</code>
1190
- </li>
1191
-
1192
- <li class="never" data-hits="" data-linenumber="113">
1193
-
1194
-
1195
- <code class="ruby">You can obtain a copy of the license at https://mozilla.org/MPL/2.0/&quot;</code>
1196
- </li>
1197
-
1198
- <li class="never" data-hits="" data-linenumber="114">
1199
-
1200
-
1201
- <code class="ruby"></code>
1202
- </li>
1203
-
1204
- <li class="missed" data-hits="0" data-linenumber="115">
1205
-
1206
-
1207
- <code class="ruby"> allow(Webdrivers::System).to receive(:call).with(&quot;#{geckodriver.driver_path} --version&quot;).and_return return_value</code>
1208
- </li>
1209
-
1210
- <li class="never" data-hits="" data-linenumber="116">
1211
-
1212
-
1213
- <code class="ruby"></code>
1214
- </li>
1215
-
1216
- <li class="missed" data-hits="0" data-linenumber="117">
1217
-
1218
-
1219
- <code class="ruby"> expect(geckodriver.current_version).to eq Gem::Version.new(&#39;0.24.0&#39;)</code>
1220
- </li>
1221
-
1222
- <li class="never" data-hits="" data-linenumber="118">
1223
-
1224
-
1225
- <code class="ruby"> end</code>
1226
- </li>
1227
-
1228
- <li class="never" data-hits="" data-linenumber="119">
1229
-
1230
-
1231
- <code class="ruby"> end</code>
1232
- </li>
1233
-
1234
- <li class="never" data-hits="" data-linenumber="120">
1235
-
1236
-
1237
- <code class="ruby"></code>
1238
- </li>
1239
-
1240
- <li class="covered" data-hits="1" data-linenumber="121">
1241
- <span class="hits">1</span>
1242
-
1243
- <code class="ruby"> describe &#39;#latest_version&#39; do</code>
1244
- </li>
1245
-
1246
- <li class="covered" data-hits="1" data-linenumber="122">
1247
- <span class="hits">1</span>
1248
-
1249
- <code class="ruby"> it &#39;finds the latest version directly&#39; do</code>
1250
- </li>
1251
-
1252
- <li class="missed" data-hits="0" data-linenumber="123">
1253
-
1254
-
1255
- <code class="ruby"> url = &#39;https://github.com/mozilla/geckodriver/releases/tag/v0.24.0&#39;</code>
1256
- </li>
1257
-
1258
- <li class="missed" data-hits="0" data-linenumber="124">
1259
-
1260
-
1261
- <code class="ruby"> allow(Webdrivers::Network).to receive(:get_url).and_return(url)</code>
1262
- </li>
1263
-
1264
- <li class="never" data-hits="" data-linenumber="125">
1265
-
1266
-
1267
- <code class="ruby"></code>
1268
- </li>
1269
-
1270
- <li class="missed" data-hits="0" data-linenumber="126">
1271
-
1272
-
1273
- <code class="ruby"> geckodriver.update</code>
1274
- </li>
1275
-
1276
- <li class="never" data-hits="" data-linenumber="127">
1277
-
1278
-
1279
- <code class="ruby"></code>
1280
- </li>
1281
-
1282
- <li class="missed" data-hits="0" data-linenumber="128">
1283
-
1284
-
1285
- <code class="ruby"> expect(geckodriver.latest_version).to eq Gem::Version.new(&#39;0.24.0&#39;)</code>
1286
- </li>
1287
-
1288
- <li class="never" data-hits="" data-linenumber="129">
1289
-
1290
-
1291
- <code class="ruby"> end</code>
1292
- </li>
1293
-
1294
- <li class="never" data-hits="" data-linenumber="130">
1295
-
1296
-
1297
- <code class="ruby"></code>
1298
- </li>
1299
-
1300
- <li class="covered" data-hits="1" data-linenumber="131">
1301
- <span class="hits">1</span>
1302
-
1303
- <code class="ruby"> it &#39;creates cached file&#39; do</code>
1304
- </li>
1305
-
1306
- <li class="missed" data-hits="0" data-linenumber="132">
1307
-
1308
-
1309
- <code class="ruby"> allow(Webdrivers::Network).to receive(:get).and_return(&#39;0.24.0&#39;)</code>
1310
- </li>
1311
-
1312
- <li class="never" data-hits="" data-linenumber="133">
1313
-
1314
-
1315
- <code class="ruby"></code>
1316
- </li>
1317
-
1318
- <li class="missed" data-hits="0" data-linenumber="134">
1319
-
1320
-
1321
- <code class="ruby"> geckodriver.latest_version</code>
1322
- </li>
1323
-
1324
- <li class="missed" data-hits="0" data-linenumber="135">
1325
-
1326
-
1327
- <code class="ruby"> expect(File.exist?(&quot;#{Webdrivers::System.install_dir}/geckodriver.version&quot;)).to eq true</code>
1328
- </li>
1329
-
1330
- <li class="never" data-hits="" data-linenumber="136">
1331
-
1332
-
1333
- <code class="ruby"> end</code>
1334
- </li>
1335
-
1336
- <li class="never" data-hits="" data-linenumber="137">
1337
-
1338
-
1339
- <code class="ruby"></code>
1340
- </li>
1341
-
1342
- <li class="covered" data-hits="1" data-linenumber="138">
1343
- <span class="hits">1</span>
1344
-
1345
- <code class="ruby"> it &#39;does not make network call if cache is valid&#39; do</code>
1346
- </li>
1347
-
1348
- <li class="missed" data-hits="0" data-linenumber="139">
1349
-
1350
-
1351
- <code class="ruby"> allow(Webdrivers).to receive(:cache_time).and_return(3600)</code>
1352
- </li>
1353
-
1354
- <li class="missed" data-hits="0" data-linenumber="140">
1355
-
1356
-
1357
- <code class="ruby"> Webdrivers::System.cache_version(&#39;geckodriver&#39;, &#39;0.23.0&#39;)</code>
1358
- </li>
1359
-
1360
- <li class="missed" data-hits="0" data-linenumber="141">
1361
-
1362
-
1363
- <code class="ruby"> allow(Webdrivers::Network).to receive(:get)</code>
1364
- </li>
1365
-
1366
- <li class="never" data-hits="" data-linenumber="142">
1367
-
1368
-
1369
- <code class="ruby"></code>
1370
- </li>
1371
-
1372
- <li class="missed" data-hits="0" data-linenumber="143">
1373
-
1374
-
1375
- <code class="ruby"> expect(geckodriver.latest_version).to eq Gem::Version.new(&#39;0.23.0&#39;)</code>
1376
- </li>
1377
-
1378
- <li class="never" data-hits="" data-linenumber="144">
1379
-
1380
-
1381
- <code class="ruby"></code>
1382
- </li>
1383
-
1384
- <li class="missed" data-hits="0" data-linenumber="145">
1385
-
1386
-
1387
- <code class="ruby"> expect(Webdrivers::Network).not_to have_received(:get)</code>
1388
- </li>
1389
-
1390
- <li class="never" data-hits="" data-linenumber="146">
1391
-
1392
-
1393
- <code class="ruby"> end</code>
1394
- </li>
1395
-
1396
- <li class="never" data-hits="" data-linenumber="147">
1397
-
1398
-
1399
- <code class="ruby"></code>
1400
- </li>
1401
-
1402
- <li class="covered" data-hits="1" data-linenumber="148">
1403
- <span class="hits">1</span>
1404
-
1405
- <code class="ruby"> it &#39;makes a network call if cache is expired&#39; do</code>
1406
- </li>
1407
-
1408
- <li class="missed" data-hits="0" data-linenumber="149">
1409
-
1410
-
1411
- <code class="ruby"> Webdrivers::System.cache_version(&#39;geckodriver&#39;, &#39;0.23.0&#39;)</code>
1412
- </li>
1413
-
1414
- <li class="missed" data-hits="0" data-linenumber="150">
1415
-
1416
-
1417
- <code class="ruby"> url = &#39;https://github.com/mozilla/geckodriver/releases/tag/v0.24.0&#39;</code>
1418
- </li>
1419
-
1420
- <li class="missed" data-hits="0" data-linenumber="151">
1421
-
1422
-
1423
- <code class="ruby"> allow(Webdrivers::Network).to receive(:get_url).and_return(url)</code>
1424
- </li>
1425
-
1426
- <li class="missed" data-hits="0" data-linenumber="152">
1427
-
1428
-
1429
- <code class="ruby"> allow(Webdrivers::System).to receive(:valid_cache?)</code>
1430
- </li>
1431
-
1432
- <li class="never" data-hits="" data-linenumber="153">
1433
-
1434
-
1435
- <code class="ruby"></code>
1436
- </li>
1437
-
1438
- <li class="missed" data-hits="0" data-linenumber="154">
1439
-
1440
-
1441
- <code class="ruby"> expect(geckodriver.latest_version).to eq Gem::Version.new(&#39;0.24.0&#39;)</code>
1442
- </li>
1443
-
1444
- <li class="never" data-hits="" data-linenumber="155">
1445
-
1446
-
1447
- <code class="ruby"></code>
1448
- </li>
1449
-
1450
- <li class="missed" data-hits="0" data-linenumber="156">
1451
-
1452
-
1453
- <code class="ruby"> expect(Webdrivers::Network).to have_received(:get_url)</code>
1454
- </li>
1455
-
1456
- <li class="missed" data-hits="0" data-linenumber="157">
1457
-
1458
-
1459
- <code class="ruby"> expect(Webdrivers::System).to have_received(:valid_cache?)</code>
1460
- </li>
1461
-
1462
- <li class="never" data-hits="" data-linenumber="158">
1463
-
1464
-
1465
- <code class="ruby"> end</code>
1466
- </li>
1467
-
1468
- <li class="never" data-hits="" data-linenumber="159">
1469
-
1470
-
1471
- <code class="ruby"> end</code>
1472
- </li>
1473
-
1474
- <li class="never" data-hits="" data-linenumber="160">
1475
-
1476
-
1477
- <code class="ruby"></code>
1478
- </li>
1479
-
1480
- <li class="covered" data-hits="1" data-linenumber="161">
1481
- <span class="hits">1</span>
1482
-
1483
- <code class="ruby"> describe &#39;#required_version=&#39; do</code>
1484
- </li>
1485
-
1486
- <li class="covered" data-hits="1" data-linenumber="162">
1487
- <span class="hits">1</span>
1488
-
1489
- <code class="ruby"> it &#39;returns the version specified as a Float&#39; do</code>
1490
- </li>
1491
-
1492
- <li class="missed" data-hits="0" data-linenumber="163">
1493
-
1494
-
1495
- <code class="ruby"> geckodriver.required_version = 0.12</code>
1496
- </li>
1497
-
1498
- <li class="never" data-hits="" data-linenumber="164">
1499
-
1500
-
1501
- <code class="ruby"></code>
1502
- </li>
1503
-
1504
- <li class="missed" data-hits="0" data-linenumber="165">
1505
-
1506
-
1507
- <code class="ruby"> expect(geckodriver.required_version).to eq Gem::Version.new(&#39;0.12&#39;)</code>
1508
- </li>
1509
-
1510
- <li class="never" data-hits="" data-linenumber="166">
1511
-
1512
-
1513
- <code class="ruby"> end</code>
1514
- </li>
1515
-
1516
- <li class="never" data-hits="" data-linenumber="167">
1517
-
1518
-
1519
- <code class="ruby"></code>
1520
- </li>
1521
-
1522
- <li class="covered" data-hits="1" data-linenumber="168">
1523
- <span class="hits">1</span>
1524
-
1525
- <code class="ruby"> it &#39;returns the version specified as a String&#39; do</code>
1526
- </li>
1527
-
1528
- <li class="missed" data-hits="0" data-linenumber="169">
1529
-
1530
-
1531
- <code class="ruby"> geckodriver.required_version = &#39;0.12.1&#39;</code>
1532
- </li>
1533
-
1534
- <li class="never" data-hits="" data-linenumber="170">
1535
-
1536
-
1537
- <code class="ruby"></code>
1538
- </li>
1539
-
1540
- <li class="missed" data-hits="0" data-linenumber="171">
1541
-
1542
-
1543
- <code class="ruby"> expect(geckodriver.required_version).to eq Gem::Version.new(&#39;0.12.1&#39;)</code>
1544
- </li>
1545
-
1546
- <li class="never" data-hits="" data-linenumber="172">
1547
-
1548
-
1549
- <code class="ruby"> end</code>
1550
- </li>
1551
-
1552
- <li class="never" data-hits="" data-linenumber="173">
1553
-
1554
-
1555
- <code class="ruby"> end</code>
1556
- </li>
1557
-
1558
- <li class="never" data-hits="" data-linenumber="174">
1559
-
1560
-
1561
- <code class="ruby"></code>
1562
- </li>
1563
-
1564
- <li class="covered" data-hits="1" data-linenumber="175">
1565
- <span class="hits">1</span>
1566
-
1567
- <code class="ruby"> describe &#39;#remove&#39; do</code>
1568
- </li>
1569
-
1570
- <li class="covered" data-hits="1" data-linenumber="176">
1571
- <span class="hits">1</span>
1572
-
1573
- <code class="ruby"> it &#39;removes existing geckodriver&#39; do</code>
1574
- </li>
1575
-
1576
- <li class="missed" data-hits="0" data-linenumber="177">
1577
-
1578
-
1579
- <code class="ruby"> geckodriver.update</code>
1580
- </li>
1581
-
1582
- <li class="never" data-hits="" data-linenumber="178">
1583
-
1584
-
1585
- <code class="ruby"></code>
1586
- </li>
1587
-
1588
- <li class="missed" data-hits="0" data-linenumber="179">
1589
-
1590
-
1591
- <code class="ruby"> geckodriver.remove</code>
1592
- </li>
1593
-
1594
- <li class="missed" data-hits="0" data-linenumber="180">
1595
-
1596
-
1597
- <code class="ruby"> expect(geckodriver.current_version).to be_nil</code>
1598
- </li>
1599
-
1600
- <li class="never" data-hits="" data-linenumber="181">
1601
-
1602
-
1603
- <code class="ruby"> end</code>
1604
- </li>
1605
-
1606
- <li class="never" data-hits="" data-linenumber="182">
1607
-
1608
-
1609
- <code class="ruby"></code>
1610
- </li>
1611
-
1612
- <li class="covered" data-hits="1" data-linenumber="183">
1613
- <span class="hits">1</span>
1614
-
1615
- <code class="ruby"> it &#39;does not raise exception if no geckodriver found&#39; do</code>
1616
- </li>
1617
-
1618
- <li class="missed" data-hits="0" data-linenumber="184">
1619
-
1620
-
1621
- <code class="ruby"> expect { geckodriver.remove }.not_to raise_error</code>
1622
- </li>
1623
-
1624
- <li class="never" data-hits="" data-linenumber="185">
1625
-
1626
-
1627
- <code class="ruby"> end</code>
1628
- </li>
1629
-
1630
- <li class="never" data-hits="" data-linenumber="186">
1631
-
1632
-
1633
- <code class="ruby"> end</code>
1634
- </li>
1635
-
1636
- <li class="never" data-hits="" data-linenumber="187">
1637
-
1638
-
1639
- <code class="ruby"></code>
1640
- </li>
1641
-
1642
- <li class="covered" data-hits="1" data-linenumber="188">
1643
- <span class="hits">1</span>
1644
-
1645
- <code class="ruby"> describe &#39;#install_dir&#39; do</code>
1646
- </li>
1647
-
1648
- <li class="covered" data-hits="1" data-linenumber="189">
1649
- <span class="hits">1</span>
1650
-
1651
- <code class="ruby"> it &#39;uses ~/.webdrivers as default value&#39; do</code>
1652
- </li>
1653
-
1654
- <li class="missed" data-hits="0" data-linenumber="190">
1655
-
1656
-
1657
- <code class="ruby"> expect(Webdrivers::System.install_dir).to include(&#39;.webdriver&#39;)</code>
1658
- </li>
1659
-
1660
- <li class="never" data-hits="" data-linenumber="191">
1661
-
1662
-
1663
- <code class="ruby"> end</code>
1664
- </li>
1665
-
1666
- <li class="never" data-hits="" data-linenumber="192">
1667
-
1668
-
1669
- <code class="ruby"></code>
1670
- </li>
1671
-
1672
- <li class="covered" data-hits="1" data-linenumber="193">
1673
- <span class="hits">1</span>
1674
-
1675
- <code class="ruby"> it &#39;uses provided value&#39; do</code>
1676
- </li>
1677
-
1678
- <li class="never" data-hits="" data-linenumber="194">
1679
-
1680
-
1681
- <code class="ruby"> begin</code>
1682
- </li>
1683
-
1684
- <li class="missed" data-hits="0" data-linenumber="195">
1685
-
1686
-
1687
- <code class="ruby"> install_dir = File.expand_path(File.join(ENV[&#39;HOME&#39;], &#39;.webdrivers2&#39;))</code>
1688
- </li>
1689
-
1690
- <li class="missed" data-hits="0" data-linenumber="196">
1691
-
1692
-
1693
- <code class="ruby"> Webdrivers.install_dir = install_dir</code>
1694
- </li>
1695
-
1696
- <li class="never" data-hits="" data-linenumber="197">
1697
-
1698
-
1699
- <code class="ruby"></code>
1700
- </li>
1701
-
1702
- <li class="missed" data-hits="0" data-linenumber="198">
1703
-
1704
-
1705
- <code class="ruby"> expect(Webdrivers::System.install_dir).to eq install_dir</code>
1706
- </li>
1707
-
1708
- <li class="never" data-hits="" data-linenumber="199">
1709
-
1710
-
1711
- <code class="ruby"> ensure</code>
1712
- </li>
1713
-
1714
- <li class="missed" data-hits="0" data-linenumber="200">
1715
-
1716
-
1717
- <code class="ruby"> Webdrivers.install_dir = nil</code>
1718
- </li>
1719
-
1720
- <li class="never" data-hits="" data-linenumber="201">
1721
-
1722
-
1723
- <code class="ruby"> end</code>
1724
- </li>
1725
-
1726
- <li class="never" data-hits="" data-linenumber="202">
1727
-
1728
-
1729
- <code class="ruby"> end</code>
1730
- </li>
1731
-
1732
- <li class="never" data-hits="" data-linenumber="203">
1733
-
1734
-
1735
- <code class="ruby"> end</code>
1736
- </li>
1737
-
1738
- <li class="never" data-hits="" data-linenumber="204">
1739
-
1740
-
1741
- <code class="ruby"></code>
1742
- </li>
1743
-
1744
- <li class="covered" data-hits="1" data-linenumber="205">
1745
- <span class="hits">1</span>
1746
-
1747
- <code class="ruby"> describe &#39;#driver_path&#39; do</code>
1748
- </li>
1749
-
1750
- <li class="covered" data-hits="1" data-linenumber="206">
1751
- <span class="hits">1</span>
1752
-
1753
- <code class="ruby"> it &#39;returns full location of binary&#39; do</code>
1754
- </li>
1755
-
1756
- <li class="missed" data-hits="0" data-linenumber="207">
1757
-
1758
-
1759
- <code class="ruby"> expected_bin = &quot;geckodriver#{&#39;.exe&#39; if Selenium::WebDriver::Platform.windows?}&quot;</code>
1760
- </li>
1761
-
1762
- <li class="missed" data-hits="0" data-linenumber="208">
1763
-
1764
-
1765
- <code class="ruby"> expected_path = Webdrivers::System.escape_path(&quot;#{File.join(ENV[&#39;HOME&#39;])}/.webdrivers/#{expected_bin}&quot;)</code>
1766
- </li>
1767
-
1768
- <li class="missed" data-hits="0" data-linenumber="209">
1769
-
1770
-
1771
- <code class="ruby"> expect(geckodriver.driver_path).to eq(expected_path)</code>
1772
- </li>
1773
-
1774
- <li class="never" data-hits="" data-linenumber="210">
1775
-
1776
-
1777
- <code class="ruby"> end</code>
1778
- </li>
1779
-
1780
- <li class="never" data-hits="" data-linenumber="211">
1781
-
1782
-
1783
- <code class="ruby"> end</code>
1784
- </li>
1785
-
1786
- <li class="never" data-hits="" data-linenumber="212">
1787
-
1788
-
1789
- <code class="ruby">end</code>
1790
- </li>
1791
-
1792
- </ol>
1793
- </pre>
1794
- </div>
1795
-
1796
-
1797
- <div class="source_table" id="b110b0bbf560886b04eeeb0a2599ab32bd56891f">
1798
- <div class="header">
1799
- <h3>i_edriver_spec.rb</h3>
1800
- <h4><span class="red">35.92 %</span> covered</h4>
1801
- <div>
1802
- <b>103</b> relevant lines.
1803
- <span class="green"><b>37</b> lines covered</span> and
1804
- <span class="red"><b>66</b> lines missed.</span>
1805
- </div>
1806
- </div>
1807
-
1808
- <pre>
1809
- <ol>
1810
-
1811
- <li class="never" data-hits="" data-linenumber="1">
1812
-
1813
-
1814
- <code class="ruby"># frozen_string_literal: true</code>
1815
- </li>
1816
-
1817
- <li class="never" data-hits="" data-linenumber="2">
1818
-
1819
-
1820
- <code class="ruby"></code>
1821
- </li>
1822
-
1823
- <li class="covered" data-hits="1" data-linenumber="3">
1824
- <span class="hits">1</span>
1825
-
1826
- <code class="ruby">require &#39;../spec_helper&#39;</code>
1827
- </li>
1828
-
1829
- <li class="never" data-hits="" data-linenumber="4">
1830
-
1831
-
1832
- <code class="ruby"></code>
1833
- </li>
1834
-
1835
- <li class="covered" data-hits="1" data-linenumber="5">
1836
- <span class="hits">1</span>
1837
-
1838
- <code class="ruby">describe Webdrivers::IEdriver do</code>
1839
- </li>
1840
-
1841
- <li class="covered" data-hits="1" data-linenumber="6">
1842
- <span class="hits">1</span>
1843
-
1844
- <code class="ruby"> let(:iedriver) { described_class }</code>
1845
- </li>
1846
-
1847
- <li class="never" data-hits="" data-linenumber="7">
1848
-
1849
-
1850
- <code class="ruby"></code>
1851
- </li>
1852
-
1853
- <li class="covered" data-hits="1" data-linenumber="8">
1854
- <span class="hits">1</span>
1855
-
1856
- <code class="ruby"> before do</code>
1857
- </li>
1858
-
1859
- <li class="missed" data-hits="0" data-linenumber="9">
1860
-
1861
-
1862
- <code class="ruby"> iedriver.remove</code>
1863
- </li>
1864
-
1865
- <li class="missed" data-hits="0" data-linenumber="10">
1866
-
1867
-
1868
- <code class="ruby"> iedriver.required_version = nil</code>
1869
- </li>
1870
-
1871
- <li class="never" data-hits="" data-linenumber="11">
1872
-
1873
-
1874
- <code class="ruby"> end</code>
1875
- </li>
1876
-
1877
- <li class="never" data-hits="" data-linenumber="12">
1878
-
1879
-
1880
- <code class="ruby"></code>
1881
- </li>
1882
-
1883
- <li class="covered" data-hits="1" data-linenumber="13">
1884
- <span class="hits">1</span>
1885
-
1886
- <code class="ruby"> describe &#39;#update&#39; do</code>
1887
- </li>
1888
-
1889
- <li class="covered" data-hits="1" data-linenumber="14">
1890
- <span class="hits">1</span>
1891
-
1892
- <code class="ruby"> context &#39;when evaluating #correct_binary?&#39; do</code>
1893
- </li>
1894
-
1895
- <li class="covered" data-hits="1" data-linenumber="15">
1896
- <span class="hits">1</span>
1897
-
1898
- <code class="ruby"> it &#39;does not download when latest version and current version match&#39; do</code>
1899
- </li>
1900
-
1901
- <li class="missed" data-hits="0" data-linenumber="16">
1902
-
1903
-
1904
- <code class="ruby"> allow(iedriver).to receive(:latest_version).and_return(Gem::Version.new(&#39;0.3.0&#39;))</code>
1905
- </li>
1906
-
1907
- <li class="missed" data-hits="0" data-linenumber="17">
1908
-
1909
-
1910
- <code class="ruby"> allow(iedriver).to receive(:current_version).and_return(Gem::Version.new(&#39;0.3.0&#39;))</code>
1911
- </li>
1912
-
1913
- <li class="never" data-hits="" data-linenumber="18">
1914
-
1915
-
1916
- <code class="ruby"></code>
1917
- </li>
1918
-
1919
- <li class="missed" data-hits="0" data-linenumber="19">
1920
-
1921
-
1922
- <code class="ruby"> iedriver.update</code>
1923
- </li>
1924
-
1925
- <li class="never" data-hits="" data-linenumber="20">
1926
-
1927
-
1928
- <code class="ruby"></code>
1929
- </li>
1930
-
1931
- <li class="missed" data-hits="0" data-linenumber="21">
1932
-
1933
-
1934
- <code class="ruby"> expect(iedriver.send(:exists?)).to be false</code>
1935
- </li>
1936
-
1937
- <li class="never" data-hits="" data-linenumber="22">
1938
-
1939
-
1940
- <code class="ruby"> end</code>
1941
- </li>
1942
-
1943
- <li class="never" data-hits="" data-linenumber="23">
1944
-
1945
-
1946
- <code class="ruby"></code>
1947
- </li>
1948
-
1949
- <li class="covered" data-hits="1" data-linenumber="24">
1950
- <span class="hits">1</span>
1951
-
1952
- <code class="ruby"> it &#39;does not download when offline, but binary exists&#39; do</code>
1953
- </li>
1954
-
1955
- <li class="missed" data-hits="0" data-linenumber="25">
1956
-
1957
-
1958
- <code class="ruby"> allow(Webdrivers::System).to receive(:call).and_return(&#39;something IEDriverServer.exe 3.5.1 something else&#39;)</code>
1959
- </li>
1960
-
1961
- <li class="missed" data-hits="0" data-linenumber="26">
1962
-
1963
-
1964
- <code class="ruby"> allow(Net::HTTP).to receive(:get_response).and_raise(SocketError)</code>
1965
- </li>
1966
-
1967
- <li class="missed" data-hits="0" data-linenumber="27">
1968
-
1969
-
1970
- <code class="ruby"> allow(iedriver).to receive(:exists?).and_return(true)</code>
1971
- </li>
1972
-
1973
- <li class="never" data-hits="" data-linenumber="28">
1974
-
1975
-
1976
- <code class="ruby"></code>
1977
- </li>
1978
-
1979
- <li class="missed" data-hits="0" data-linenumber="29">
1980
-
1981
-
1982
- <code class="ruby"> iedriver.update</code>
1983
- </li>
1984
-
1985
- <li class="never" data-hits="" data-linenumber="30">
1986
-
1987
-
1988
- <code class="ruby"></code>
1989
- </li>
1990
-
1991
- <li class="missed" data-hits="0" data-linenumber="31">
1992
-
1993
-
1994
- <code class="ruby"> expect(File.exist?(iedriver.driver_path)).to be false</code>
1995
- </li>
1996
-
1997
- <li class="never" data-hits="" data-linenumber="32">
1998
-
1999
-
2000
- <code class="ruby"> end</code>
2001
- </li>
2002
-
2003
- <li class="never" data-hits="" data-linenumber="33">
2004
-
2005
-
2006
- <code class="ruby"></code>
2007
- </li>
2008
-
2009
- <li class="covered" data-hits="1" data-linenumber="34">
2010
- <span class="hits">1</span>
2011
-
2012
- <code class="ruby"> it &#39;raises ConnectionError when offline, and no binary exists&#39; do</code>
2013
- </li>
2014
-
2015
- <li class="missed" data-hits="0" data-linenumber="35">
2016
-
2017
-
2018
- <code class="ruby"> allow(Net::HTTP).to receive(:get_response).and_raise(SocketError)</code>
2019
- </li>
2020
-
2021
- <li class="missed" data-hits="0" data-linenumber="36">
2022
-
2023
-
2024
- <code class="ruby"> allow(iedriver).to receive(:exists?).and_return(false)</code>
2025
- </li>
2026
-
2027
- <li class="never" data-hits="" data-linenumber="37">
2028
-
2029
-
2030
- <code class="ruby"></code>
2031
- </li>
2032
-
2033
- <li class="missed" data-hits="0" data-linenumber="38">
2034
-
2035
-
2036
- <code class="ruby"> expect { iedriver.update }.to raise_error(Webdrivers::ConnectionError)</code>
2037
- </li>
2038
-
2039
- <li class="never" data-hits="" data-linenumber="39">
2040
-
2041
-
2042
- <code class="ruby"> end</code>
2043
- </li>
2044
-
2045
- <li class="never" data-hits="" data-linenumber="40">
2046
-
2047
-
2048
- <code class="ruby"> end</code>
2049
- </li>
2050
-
2051
- <li class="never" data-hits="" data-linenumber="41">
2052
-
2053
-
2054
- <code class="ruby"></code>
2055
- </li>
2056
-
2057
- <li class="covered" data-hits="1" data-linenumber="42">
2058
- <span class="hits">1</span>
2059
-
2060
- <code class="ruby"> context &#39;when correct binary is found&#39; do</code>
2061
- </li>
2062
-
2063
- <li class="covered" data-hits="1" data-linenumber="43">
2064
- <span class="hits">1</span>
2065
-
2066
- <code class="ruby"> before { allow(iedriver).to receive(:correct_binary?).and_return(true) }</code>
2067
- </li>
2068
-
2069
- <li class="never" data-hits="" data-linenumber="44">
2070
-
2071
-
2072
- <code class="ruby"></code>
2073
- </li>
2074
-
2075
- <li class="covered" data-hits="1" data-linenumber="45">
2076
- <span class="hits">1</span>
2077
-
2078
- <code class="ruby"> it &#39;does not download&#39; do</code>
2079
- </li>
2080
-
2081
- <li class="missed" data-hits="0" data-linenumber="46">
2082
-
2083
-
2084
- <code class="ruby"> iedriver.update</code>
2085
- </li>
2086
-
2087
- <li class="never" data-hits="" data-linenumber="47">
2088
-
2089
-
2090
- <code class="ruby"></code>
2091
- </li>
2092
-
2093
- <li class="missed" data-hits="0" data-linenumber="48">
2094
-
2095
-
2096
- <code class="ruby"> expect(iedriver.current_version).to be_nil</code>
2097
- </li>
2098
-
2099
- <li class="never" data-hits="" data-linenumber="49">
2100
-
2101
-
2102
- <code class="ruby"> end</code>
2103
- </li>
2104
-
2105
- <li class="never" data-hits="" data-linenumber="50">
2106
-
2107
-
2108
- <code class="ruby"></code>
2109
- </li>
2110
-
2111
- <li class="covered" data-hits="1" data-linenumber="51">
2112
- <span class="hits">1</span>
2113
-
2114
- <code class="ruby"> it &#39;does not raise exception if offline&#39; do</code>
2115
- </li>
2116
-
2117
- <li class="missed" data-hits="0" data-linenumber="52">
2118
-
2119
-
2120
- <code class="ruby"> allow(Net::HTTP).to receive(:get_response).and_raise(SocketError)</code>
2121
- </li>
2122
-
2123
- <li class="never" data-hits="" data-linenumber="53">
2124
-
2125
-
2126
- <code class="ruby"></code>
2127
- </li>
2128
-
2129
- <li class="missed" data-hits="0" data-linenumber="54">
2130
-
2131
-
2132
- <code class="ruby"> iedriver.update</code>
2133
- </li>
2134
-
2135
- <li class="never" data-hits="" data-linenumber="55">
2136
-
2137
-
2138
- <code class="ruby"></code>
2139
- </li>
2140
-
2141
- <li class="missed" data-hits="0" data-linenumber="56">
2142
-
2143
-
2144
- <code class="ruby"> expect(iedriver.current_version).to be_nil</code>
2145
- </li>
2146
-
2147
- <li class="never" data-hits="" data-linenumber="57">
2148
-
2149
-
2150
- <code class="ruby"> end</code>
2151
- </li>
2152
-
2153
- <li class="never" data-hits="" data-linenumber="58">
2154
-
2155
-
2156
- <code class="ruby"> end</code>
2157
- </li>
2158
-
2159
- <li class="never" data-hits="" data-linenumber="59">
2160
-
2161
-
2162
- <code class="ruby"></code>
2163
- </li>
2164
-
2165
- <li class="covered" data-hits="1" data-linenumber="60">
2166
- <span class="hits">1</span>
2167
-
2168
- <code class="ruby"> context &#39;when correct binary is not found&#39; do</code>
2169
- </li>
2170
-
2171
- <li class="covered" data-hits="1" data-linenumber="61">
2172
- <span class="hits">1</span>
2173
-
2174
- <code class="ruby"> before { allow(iedriver).to receive(:correct_binary?).and_return(false) }</code>
2175
- </li>
2176
-
2177
- <li class="never" data-hits="" data-linenumber="62">
2178
-
2179
-
2180
- <code class="ruby"></code>
2181
- </li>
2182
-
2183
- <li class="covered" data-hits="1" data-linenumber="63">
2184
- <span class="hits">1</span>
2185
-
2186
- <code class="ruby"> it &#39;downloads binary&#39; do</code>
2187
- </li>
2188
-
2189
- <li class="missed" data-hits="0" data-linenumber="64">
2190
-
2191
-
2192
- <code class="ruby"> iedriver.update</code>
2193
- </li>
2194
-
2195
- <li class="never" data-hits="" data-linenumber="65">
2196
-
2197
-
2198
- <code class="ruby"></code>
2199
- </li>
2200
-
2201
- <li class="missed" data-hits="0" data-linenumber="66">
2202
-
2203
-
2204
- <code class="ruby"> expect(File.exist?(iedriver.driver_path)).to eq true</code>
2205
- </li>
2206
-
2207
- <li class="never" data-hits="" data-linenumber="67">
2208
-
2209
-
2210
- <code class="ruby"> end</code>
2211
- </li>
2212
-
2213
- <li class="never" data-hits="" data-linenumber="68">
2214
-
2215
-
2216
- <code class="ruby"></code>
2217
- </li>
2218
-
2219
- <li class="covered" data-hits="1" data-linenumber="69">
2220
- <span class="hits">1</span>
2221
-
2222
- <code class="ruby"> it &#39;raises ConnectionError if offline&#39; do</code>
2223
- </li>
2224
-
2225
- <li class="missed" data-hits="0" data-linenumber="70">
2226
-
2227
-
2228
- <code class="ruby"> allow(Net::HTTP).to receive(:get_response).and_raise(SocketError)</code>
2229
- </li>
2230
-
2231
- <li class="never" data-hits="" data-linenumber="71">
2232
-
2233
-
2234
- <code class="ruby"></code>
2235
- </li>
2236
-
2237
- <li class="missed" data-hits="0" data-linenumber="72">
2238
-
2239
-
2240
- <code class="ruby"> msg = %r{Can not reach https://selenium-release.storage.googleapis.com/}</code>
2241
- </li>
2242
-
2243
- <li class="missed" data-hits="0" data-linenumber="73">
2244
-
2245
-
2246
- <code class="ruby"> expect { iedriver.update }.to raise_error(Webdrivers::ConnectionError, msg)</code>
2247
- </li>
2248
-
2249
- <li class="never" data-hits="" data-linenumber="74">
2250
-
2251
-
2252
- <code class="ruby"> end</code>
2253
- </li>
2254
-
2255
- <li class="never" data-hits="" data-linenumber="75">
2256
-
2257
-
2258
- <code class="ruby"> end</code>
2259
- </li>
2260
-
2261
- <li class="never" data-hits="" data-linenumber="76">
2262
-
2263
-
2264
- <code class="ruby"> end</code>
2265
- </li>
2266
-
2267
- <li class="never" data-hits="" data-linenumber="77">
2268
-
2269
-
2270
- <code class="ruby"></code>
2271
- </li>
2272
-
2273
- <li class="covered" data-hits="1" data-linenumber="78">
2274
- <span class="hits">1</span>
2275
-
2276
- <code class="ruby"> describe &#39;#current_version&#39; do</code>
2277
- </li>
2278
-
2279
- <li class="covered" data-hits="1" data-linenumber="79">
2280
- <span class="hits">1</span>
2281
-
2282
- <code class="ruby"> it &#39;returns nil if binary does not exist on the system&#39; do</code>
2283
- </li>
2284
-
2285
- <li class="missed" data-hits="0" data-linenumber="80">
2286
-
2287
-
2288
- <code class="ruby"> allow(iedriver).to receive(:driver_path).and_return(&#39;&#39;)</code>
2289
- </li>
2290
-
2291
- <li class="never" data-hits="" data-linenumber="81">
2292
-
2293
-
2294
- <code class="ruby"></code>
2295
- </li>
2296
-
2297
- <li class="missed" data-hits="0" data-linenumber="82">
2298
-
2299
-
2300
- <code class="ruby"> expect(iedriver.current_version).to be_nil</code>
2301
- </li>
2302
-
2303
- <li class="never" data-hits="" data-linenumber="83">
2304
-
2305
-
2306
- <code class="ruby"> end</code>
2307
- </li>
2308
-
2309
- <li class="never" data-hits="" data-linenumber="84">
2310
-
2311
-
2312
- <code class="ruby"></code>
2313
- </li>
2314
-
2315
- <li class="covered" data-hits="1" data-linenumber="85">
2316
- <span class="hits">1</span>
2317
-
2318
- <code class="ruby"> it &#39;returns a Gem::Version instance if binary is on the system&#39; do</code>
2319
- </li>
2320
-
2321
- <li class="missed" data-hits="0" data-linenumber="86">
2322
-
2323
-
2324
- <code class="ruby"> allow(iedriver).to receive(:exists?).and_return(true)</code>
2325
- </li>
2326
-
2327
- <li class="never" data-hits="" data-linenumber="87">
2328
-
2329
-
2330
- <code class="ruby"></code>
2331
- </li>
2332
-
2333
- <li class="missed" data-hits="0" data-linenumber="88">
2334
-
2335
-
2336
- <code class="ruby"> return_value = &#39;something IEDriverServer.exe 3.5.1 something else&#39;</code>
2337
- </li>
2338
-
2339
- <li class="never" data-hits="" data-linenumber="89">
2340
-
2341
-
2342
- <code class="ruby"></code>
2343
- </li>
2344
-
2345
- <li class="missed" data-hits="0" data-linenumber="90">
2346
-
2347
-
2348
- <code class="ruby"> allow(Webdrivers::System).to receive(:call).with(&quot;#{iedriver.driver_path} --version&quot;).and_return return_value</code>
2349
- </li>
2350
-
2351
- <li class="never" data-hits="" data-linenumber="91">
2352
-
2353
-
2354
- <code class="ruby"></code>
2355
- </li>
2356
-
2357
- <li class="missed" data-hits="0" data-linenumber="92">
2358
-
2359
-
2360
- <code class="ruby"> expect(iedriver.current_version).to eq Gem::Version.new(&#39;3.5.1&#39;)</code>
2361
- </li>
2362
-
2363
- <li class="never" data-hits="" data-linenumber="93">
2364
-
2365
-
2366
- <code class="ruby"> end</code>
2367
- </li>
2368
-
2369
- <li class="never" data-hits="" data-linenumber="94">
2370
-
2371
-
2372
- <code class="ruby"> end</code>
2373
- </li>
2374
-
2375
- <li class="never" data-hits="" data-linenumber="95">
2376
-
2377
-
2378
- <code class="ruby"></code>
2379
- </li>
2380
-
2381
- <li class="covered" data-hits="1" data-linenumber="96">
2382
- <span class="hits">1</span>
2383
-
2384
- <code class="ruby"> describe &#39;#latest_version&#39; do</code>
2385
- </li>
2386
-
2387
- <li class="covered" data-hits="1" data-linenumber="97">
2388
- <span class="hits">1</span>
2389
-
2390
- <code class="ruby"> it &#39;finds the latest version from parsed hash&#39; do</code>
2391
- </li>
2392
-
2393
- <li class="missed" data-hits="0" data-linenumber="98">
2394
-
2395
-
2396
- <code class="ruby"> base = &#39;https://selenium-release.storage.googleapis.com/&#39;</code>
2397
- </li>
2398
-
2399
- <li class="missed" data-hits="0" data-linenumber="99">
2400
-
2401
-
2402
- <code class="ruby"> hash = {Gem::Version.new(&#39;3.4.0&#39;) =&gt; &quot;#{base}/3.4/IEDriverServer_Win32_3.4.0.zip&quot;,</code>
2403
- </li>
2404
-
2405
- <li class="never" data-hits="" data-linenumber="100">
2406
-
2407
-
2408
- <code class="ruby"> Gem::Version.new(&#39;3.5.0&#39;) =&gt; &quot;#{base}/3.5/IEDriverServer_Win32_3.5.0.zip&quot;,</code>
2409
- </li>
2410
-
2411
- <li class="never" data-hits="" data-linenumber="101">
2412
-
2413
-
2414
- <code class="ruby"> Gem::Version.new(&#39;3.5.1&#39;) =&gt; &quot;#{base}/3.5/IEDriverServer_Win32_3.5.1.zip&quot;}</code>
2415
- </li>
2416
-
2417
- <li class="missed" data-hits="0" data-linenumber="102">
2418
-
2419
-
2420
- <code class="ruby"> allow(iedriver).to receive(:downloads).and_return(hash)</code>
2421
- </li>
2422
-
2423
- <li class="never" data-hits="" data-linenumber="103">
2424
-
2425
-
2426
- <code class="ruby"></code>
2427
- </li>
2428
-
2429
- <li class="missed" data-hits="0" data-linenumber="104">
2430
-
2431
-
2432
- <code class="ruby"> expect(iedriver.latest_version).to eq Gem::Version.new(&#39;3.5.1&#39;)</code>
2433
- </li>
2434
-
2435
- <li class="never" data-hits="" data-linenumber="105">
2436
-
2437
-
2438
- <code class="ruby"> end</code>
2439
- </li>
2440
-
2441
- <li class="never" data-hits="" data-linenumber="106">
2442
-
2443
-
2444
- <code class="ruby"></code>
2445
- </li>
2446
-
2447
- <li class="covered" data-hits="1" data-linenumber="107">
2448
- <span class="hits">1</span>
2449
-
2450
- <code class="ruby"> it &#39;correctly parses the downloads page&#39; do</code>
2451
- </li>
2452
-
2453
- <li class="missed" data-hits="0" data-linenumber="108">
2454
-
2455
-
2456
- <code class="ruby"> expect(iedriver.send(:downloads)).not_to be_empty</code>
2457
- </li>
2458
-
2459
- <li class="never" data-hits="" data-linenumber="109">
2460
-
2461
-
2462
- <code class="ruby"> end</code>
2463
- </li>
2464
-
2465
- <li class="never" data-hits="" data-linenumber="110">
2466
-
2467
-
2468
- <code class="ruby"></code>
2469
- </li>
2470
-
2471
- <li class="covered" data-hits="1" data-linenumber="111">
2472
- <span class="hits">1</span>
2473
-
2474
- <code class="ruby"> it &#39;creates cached file&#39; do</code>
2475
- </li>
2476
-
2477
- <li class="missed" data-hits="0" data-linenumber="112">
2478
-
2479
-
2480
- <code class="ruby"> allow(Webdrivers::Network).to receive(:get).and_return(&#39;3.4.0&#39;)</code>
2481
- </li>
2482
-
2483
- <li class="never" data-hits="" data-linenumber="113">
2484
-
2485
-
2486
- <code class="ruby"></code>
2487
- </li>
2488
-
2489
- <li class="missed" data-hits="0" data-linenumber="114">
2490
-
2491
-
2492
- <code class="ruby"> iedriver.latest_version</code>
2493
- </li>
2494
-
2495
- <li class="missed" data-hits="0" data-linenumber="115">
2496
-
2497
-
2498
- <code class="ruby"> expect(File.exist?(&quot;#{Webdrivers::System.install_dir}/IEDriverServer.version&quot;)).to eq true</code>
2499
- </li>
2500
-
2501
- <li class="never" data-hits="" data-linenumber="116">
2502
-
2503
-
2504
- <code class="ruby"> end</code>
2505
- </li>
2506
-
2507
- <li class="never" data-hits="" data-linenumber="117">
2508
-
2509
-
2510
- <code class="ruby"></code>
2511
- </li>
2512
-
2513
- <li class="covered" data-hits="1" data-linenumber="118">
2514
- <span class="hits">1</span>
2515
-
2516
- <code class="ruby"> it &#39;does not make network call if cache is valid&#39; do</code>
2517
- </li>
2518
-
2519
- <li class="missed" data-hits="0" data-linenumber="119">
2520
-
2521
-
2522
- <code class="ruby"> allow(Webdrivers).to receive(:cache_time).and_return(3600)</code>
2523
- </li>
2524
-
2525
- <li class="missed" data-hits="0" data-linenumber="120">
2526
-
2527
-
2528
- <code class="ruby"> Webdrivers::System.cache_version(&#39;IEDriverServer&#39;, &#39;3.4.0&#39;)</code>
2529
- </li>
2530
-
2531
- <li class="missed" data-hits="0" data-linenumber="121">
2532
-
2533
-
2534
- <code class="ruby"> allow(Webdrivers::Network).to receive(:get)</code>
2535
- </li>
2536
-
2537
- <li class="never" data-hits="" data-linenumber="122">
2538
-
2539
-
2540
- <code class="ruby"></code>
2541
- </li>
2542
-
2543
- <li class="missed" data-hits="0" data-linenumber="123">
2544
-
2545
-
2546
- <code class="ruby"> expect(iedriver.latest_version).to eq Gem::Version.new(&#39;3.4.0&#39;)</code>
2547
- </li>
2548
-
2549
- <li class="never" data-hits="" data-linenumber="124">
2550
-
2551
-
2552
- <code class="ruby"></code>
2553
- </li>
2554
-
2555
- <li class="missed" data-hits="0" data-linenumber="125">
2556
-
2557
-
2558
- <code class="ruby"> expect(Webdrivers::Network).not_to have_received(:get)</code>
2559
- </li>
2560
-
2561
- <li class="never" data-hits="" data-linenumber="126">
2562
-
2563
-
2564
- <code class="ruby"> end</code>
2565
- </li>
2566
-
2567
- <li class="never" data-hits="" data-linenumber="127">
2568
-
2569
-
2570
- <code class="ruby"></code>
2571
- </li>
2572
-
2573
- <li class="covered" data-hits="1" data-linenumber="128">
2574
- <span class="hits">1</span>
2575
-
2576
- <code class="ruby"> it &#39;makes a network call if cache is expired&#39; do</code>
2577
- </li>
2578
-
2579
- <li class="missed" data-hits="0" data-linenumber="129">
2580
-
2581
-
2582
- <code class="ruby"> Webdrivers::System.cache_version(&#39;IEDriverServer&#39;, &#39;3.4.0&#39;)</code>
2583
- </li>
2584
-
2585
- <li class="missed" data-hits="0" data-linenumber="130">
2586
-
2587
-
2588
- <code class="ruby"> base = &#39;https://selenium-release.storage.googleapis.com/&#39;</code>
2589
- </li>
2590
-
2591
- <li class="missed" data-hits="0" data-linenumber="131">
2592
-
2593
-
2594
- <code class="ruby"> hash = {Gem::Version.new(&#39;3.4.0&#39;) =&gt; &quot;#{base}/3.4/IEDriverServer_Win32_3.4.0.zip&quot;,</code>
2595
- </li>
2596
-
2597
- <li class="never" data-hits="" data-linenumber="132">
2598
-
2599
-
2600
- <code class="ruby"> Gem::Version.new(&#39;3.5.0&#39;) =&gt; &quot;#{base}/3.5/IEDriverServer_Win32_3.5.0.zip&quot;,</code>
2601
- </li>
2602
-
2603
- <li class="never" data-hits="" data-linenumber="133">
2604
-
2605
-
2606
- <code class="ruby"> Gem::Version.new(&#39;3.5.1&#39;) =&gt; &quot;#{base}/3.5/IEDriverServer_Win32_3.5.1.zip&quot;}</code>
2607
- </li>
2608
-
2609
- <li class="missed" data-hits="0" data-linenumber="134">
2610
-
2611
-
2612
- <code class="ruby"> allow(iedriver).to receive(:downloads).and_return(hash)</code>
2613
- </li>
2614
-
2615
- <li class="missed" data-hits="0" data-linenumber="135">
2616
-
2617
-
2618
- <code class="ruby"> allow(Webdrivers::System).to receive(:valid_cache?)</code>
2619
- </li>
2620
-
2621
- <li class="never" data-hits="" data-linenumber="136">
2622
-
2623
-
2624
- <code class="ruby"></code>
2625
- </li>
2626
-
2627
- <li class="missed" data-hits="0" data-linenumber="137">
2628
-
2629
-
2630
- <code class="ruby"> expect(iedriver.latest_version).to eq Gem::Version.new(&#39;3.5.1&#39;)</code>
2631
- </li>
2632
-
2633
- <li class="missed" data-hits="0" data-linenumber="138">
2634
-
2635
-
2636
- <code class="ruby"> expect(iedriver).to have_received(:downloads)</code>
2637
- </li>
2638
-
2639
- <li class="missed" data-hits="0" data-linenumber="139">
2640
-
2641
-
2642
- <code class="ruby"> expect(Webdrivers::System).to have_received(:valid_cache?)</code>
2643
- </li>
2644
-
2645
- <li class="never" data-hits="" data-linenumber="140">
2646
-
2647
-
2648
- <code class="ruby"> end</code>
2649
- </li>
2650
-
2651
- <li class="never" data-hits="" data-linenumber="141">
2652
-
2653
-
2654
- <code class="ruby"> end</code>
2655
- </li>
2656
-
2657
- <li class="never" data-hits="" data-linenumber="142">
2658
-
2659
-
2660
- <code class="ruby"></code>
2661
- </li>
2662
-
2663
- <li class="covered" data-hits="1" data-linenumber="143">
2664
- <span class="hits">1</span>
2665
-
2666
- <code class="ruby"> describe &#39;#required_version=&#39; do</code>
2667
- </li>
2668
-
2669
- <li class="covered" data-hits="1" data-linenumber="144">
2670
- <span class="hits">1</span>
2671
-
2672
- <code class="ruby"> it &#39;returns the version specified as a Float&#39; do</code>
2673
- </li>
2674
-
2675
- <li class="missed" data-hits="0" data-linenumber="145">
2676
-
2677
-
2678
- <code class="ruby"> iedriver.required_version = 0.12</code>
2679
- </li>
2680
-
2681
- <li class="never" data-hits="" data-linenumber="146">
2682
-
2683
-
2684
- <code class="ruby"></code>
2685
- </li>
2686
-
2687
- <li class="missed" data-hits="0" data-linenumber="147">
2688
-
2689
-
2690
- <code class="ruby"> expect(iedriver.required_version).to eq Gem::Version.new(&#39;0.12&#39;)</code>
2691
- </li>
2692
-
2693
- <li class="never" data-hits="" data-linenumber="148">
2694
-
2695
-
2696
- <code class="ruby"> end</code>
2697
- </li>
2698
-
2699
- <li class="never" data-hits="" data-linenumber="149">
2700
-
2701
-
2702
- <code class="ruby"></code>
2703
- </li>
2704
-
2705
- <li class="covered" data-hits="1" data-linenumber="150">
2706
- <span class="hits">1</span>
2707
-
2708
- <code class="ruby"> it &#39;returns the version specified as a String&#39; do</code>
2709
- </li>
2710
-
2711
- <li class="missed" data-hits="0" data-linenumber="151">
2712
-
2713
-
2714
- <code class="ruby"> iedriver.required_version = &#39;0.12.1&#39;</code>
2715
- </li>
2716
-
2717
- <li class="never" data-hits="" data-linenumber="152">
2718
-
2719
-
2720
- <code class="ruby"></code>
2721
- </li>
2722
-
2723
- <li class="missed" data-hits="0" data-linenumber="153">
2724
-
2725
-
2726
- <code class="ruby"> expect(iedriver.required_version).to eq Gem::Version.new(&#39;0.12.1&#39;)</code>
2727
- </li>
2728
-
2729
- <li class="never" data-hits="" data-linenumber="154">
2730
-
2731
-
2732
- <code class="ruby"> end</code>
2733
- </li>
2734
-
2735
- <li class="never" data-hits="" data-linenumber="155">
2736
-
2737
-
2738
- <code class="ruby"> end</code>
2739
- </li>
2740
-
2741
- <li class="never" data-hits="" data-linenumber="156">
2742
-
2743
-
2744
- <code class="ruby"></code>
2745
- </li>
2746
-
2747
- <li class="covered" data-hits="1" data-linenumber="157">
2748
- <span class="hits">1</span>
2749
-
2750
- <code class="ruby"> describe &#39;#remove&#39; do</code>
2751
- </li>
2752
-
2753
- <li class="covered" data-hits="1" data-linenumber="158">
2754
- <span class="hits">1</span>
2755
-
2756
- <code class="ruby"> it &#39;removes existing iedriver&#39; do</code>
2757
- </li>
2758
-
2759
- <li class="missed" data-hits="0" data-linenumber="159">
2760
-
2761
-
2762
- <code class="ruby"> iedriver.update</code>
2763
- </li>
2764
-
2765
- <li class="never" data-hits="" data-linenumber="160">
2766
-
2767
-
2768
- <code class="ruby"></code>
2769
- </li>
2770
-
2771
- <li class="missed" data-hits="0" data-linenumber="161">
2772
-
2773
-
2774
- <code class="ruby"> iedriver.remove</code>
2775
- </li>
2776
-
2777
- <li class="missed" data-hits="0" data-linenumber="162">
2778
-
2779
-
2780
- <code class="ruby"> expect(iedriver.current_version).to be_nil</code>
2781
- </li>
2782
-
2783
- <li class="never" data-hits="" data-linenumber="163">
2784
-
2785
-
2786
- <code class="ruby"> end</code>
2787
- </li>
2788
-
2789
- <li class="never" data-hits="" data-linenumber="164">
2790
-
2791
-
2792
- <code class="ruby"></code>
2793
- </li>
2794
-
2795
- <li class="covered" data-hits="1" data-linenumber="165">
2796
- <span class="hits">1</span>
2797
-
2798
- <code class="ruby"> it &#39;does not raise exception if no iedriver found&#39; do</code>
2799
- </li>
2800
-
2801
- <li class="missed" data-hits="0" data-linenumber="166">
2802
-
2803
-
2804
- <code class="ruby"> expect { iedriver.remove }.not_to raise_error</code>
2805
- </li>
2806
-
2807
- <li class="never" data-hits="" data-linenumber="167">
2808
-
2809
-
2810
- <code class="ruby"> end</code>
2811
- </li>
2812
-
2813
- <li class="never" data-hits="" data-linenumber="168">
2814
-
2815
-
2816
- <code class="ruby"> end</code>
2817
- </li>
2818
-
2819
- <li class="never" data-hits="" data-linenumber="169">
2820
-
2821
-
2822
- <code class="ruby"></code>
2823
- </li>
2824
-
2825
- <li class="covered" data-hits="1" data-linenumber="170">
2826
- <span class="hits">1</span>
2827
-
2828
- <code class="ruby"> describe &#39;#install_dir&#39; do</code>
2829
- </li>
2830
-
2831
- <li class="covered" data-hits="1" data-linenumber="171">
2832
- <span class="hits">1</span>
2833
-
2834
- <code class="ruby"> it &#39;uses ~/.webdrivers as default value&#39; do</code>
2835
- </li>
2836
-
2837
- <li class="missed" data-hits="0" data-linenumber="172">
2838
-
2839
-
2840
- <code class="ruby"> expect(Webdrivers::System.install_dir).to include(&#39;.webdriver&#39;)</code>
2841
- </li>
2842
-
2843
- <li class="never" data-hits="" data-linenumber="173">
2844
-
2845
-
2846
- <code class="ruby"> end</code>
2847
- </li>
2848
-
2849
- <li class="never" data-hits="" data-linenumber="174">
2850
-
2851
-
2852
- <code class="ruby"></code>
2853
- </li>
2854
-
2855
- <li class="covered" data-hits="1" data-linenumber="175">
2856
- <span class="hits">1</span>
2857
-
2858
- <code class="ruby"> it &#39;uses provided value&#39; do</code>
2859
- </li>
2860
-
2861
- <li class="never" data-hits="" data-linenumber="176">
2862
-
2863
-
2864
- <code class="ruby"> begin</code>
2865
- </li>
2866
-
2867
- <li class="missed" data-hits="0" data-linenumber="177">
2868
-
2869
-
2870
- <code class="ruby"> install_dir = File.expand_path(File.join(ENV[&#39;HOME&#39;], &#39;.webdrivers2&#39;))</code>
2871
- </li>
2872
-
2873
- <li class="missed" data-hits="0" data-linenumber="178">
2874
-
2875
-
2876
- <code class="ruby"> Webdrivers.install_dir = install_dir</code>
2877
- </li>
2878
-
2879
- <li class="never" data-hits="" data-linenumber="179">
2880
-
2881
-
2882
- <code class="ruby"></code>
2883
- </li>
2884
-
2885
- <li class="missed" data-hits="0" data-linenumber="180">
2886
-
2887
-
2888
- <code class="ruby"> expect(Webdrivers::System.install_dir).to eq install_dir</code>
2889
- </li>
2890
-
2891
- <li class="never" data-hits="" data-linenumber="181">
2892
-
2893
-
2894
- <code class="ruby"> ensure</code>
2895
- </li>
2896
-
2897
- <li class="missed" data-hits="0" data-linenumber="182">
2898
-
2899
-
2900
- <code class="ruby"> Webdrivers.install_dir = nil</code>
2901
- </li>
2902
-
2903
- <li class="never" data-hits="" data-linenumber="183">
2904
-
2905
-
2906
- <code class="ruby"> end</code>
2907
- </li>
2908
-
2909
- <li class="never" data-hits="" data-linenumber="184">
2910
-
2911
-
2912
- <code class="ruby"> end</code>
2913
- </li>
2914
-
2915
- <li class="never" data-hits="" data-linenumber="185">
2916
-
2917
-
2918
- <code class="ruby"> end</code>
2919
- </li>
2920
-
2921
- <li class="never" data-hits="" data-linenumber="186">
2922
-
2923
-
2924
- <code class="ruby"></code>
2925
- </li>
2926
-
2927
- <li class="covered" data-hits="1" data-linenumber="187">
2928
- <span class="hits">1</span>
2929
-
2930
- <code class="ruby"> describe &#39;#driver_path&#39; do</code>
2931
- </li>
2932
-
2933
- <li class="covered" data-hits="1" data-linenumber="188">
2934
- <span class="hits">1</span>
2935
-
2936
- <code class="ruby"> it &#39;returns full location of binary&#39; do</code>
2937
- </li>
2938
-
2939
- <li class="missed" data-hits="0" data-linenumber="189">
2940
-
2941
-
2942
- <code class="ruby"> expected_path = Webdrivers::System.escape_path(&quot;#{File.join(ENV[&#39;HOME&#39;])}/.webdrivers/IEDriverServer.exe&quot;)</code>
2943
- </li>
2944
-
2945
- <li class="missed" data-hits="0" data-linenumber="190">
2946
-
2947
-
2948
- <code class="ruby"> expect(iedriver.driver_path).to eq(expected_path)</code>
2949
- </li>
2950
-
2951
- <li class="never" data-hits="" data-linenumber="191">
2952
-
2953
-
2954
- <code class="ruby"> end</code>
2955
- </li>
2956
-
2957
- <li class="never" data-hits="" data-linenumber="192">
2958
-
2959
-
2960
- <code class="ruby"> end</code>
2961
- </li>
2962
-
2963
- <li class="never" data-hits="" data-linenumber="193">
2964
-
2965
-
2966
- <code class="ruby">end</code>
2967
- </li>
2968
-
2969
- </ol>
2970
- </pre>
2971
- </div>
2972
-
2973
-
2974
- <div class="source_table" id="bb23367ebba321ca72c763483bfad18fec31566e">
2975
- <div class="header">
2976
- <h3>webdrivers_spec.rb</h3>
2977
- <h4><span class="red">53.49 %</span> covered</h4>
2978
- <div>
2979
- <b>43</b> relevant lines.
2980
- <span class="green"><b>23</b> lines covered</span> and
2981
- <span class="red"><b>20</b> lines missed.</span>
2982
- </div>
2983
- </div>
2984
-
2985
- <pre>
2986
- <ol>
2987
-
2988
- <li class="never" data-hits="" data-linenumber="1">
2989
-
2990
-
2991
- <code class="ruby"># frozen_string_literal: true</code>
2992
- </li>
2993
-
2994
- <li class="never" data-hits="" data-linenumber="2">
2995
-
2996
-
2997
- <code class="ruby"></code>
2998
- </li>
2999
-
3000
- <li class="covered" data-hits="1" data-linenumber="3">
3001
- <span class="hits">1</span>
3002
-
3003
- <code class="ruby">require &#39;../spec_helper&#39;</code>
3004
- </li>
3005
-
3006
- <li class="never" data-hits="" data-linenumber="4">
3007
-
3008
-
3009
- <code class="ruby"></code>
3010
- </li>
3011
-
3012
- <li class="covered" data-hits="1" data-linenumber="5">
3013
- <span class="hits">1</span>
3014
-
3015
- <code class="ruby">describe Webdrivers do</code>
3016
- </li>
3017
-
3018
- <li class="covered" data-hits="1" data-linenumber="6">
3019
- <span class="hits">1</span>
3020
-
3021
- <code class="ruby"> describe &#39;#cache_time&#39; do</code>
3022
- </li>
3023
-
3024
- <li class="covered" data-hits="1" data-linenumber="7">
3025
- <span class="hits">1</span>
3026
-
3027
- <code class="ruby"> before { Webdrivers::Chromedriver.remove }</code>
3028
- </li>
3029
-
3030
- <li class="never" data-hits="" data-linenumber="8">
3031
-
3032
-
3033
- <code class="ruby"></code>
3034
- </li>
3035
-
3036
- <li class="covered" data-hits="1" data-linenumber="9">
3037
- <span class="hits">1</span>
3038
-
3039
- <code class="ruby"> after { described_class.cache_time = nil }</code>
3040
- </li>
3041
-
3042
- <li class="never" data-hits="" data-linenumber="10">
3043
-
3044
-
3045
- <code class="ruby"></code>
3046
- </li>
3047
-
3048
- <li class="covered" data-hits="1" data-linenumber="11">
3049
- <span class="hits">1</span>
3050
-
3051
- <code class="ruby"> context &#39;when cache time is not set&#39; do</code>
3052
- </li>
3053
-
3054
- <li class="covered" data-hits="1" data-linenumber="12">
3055
- <span class="hits">1</span>
3056
-
3057
- <code class="ruby"> before { described_class.cache_time = nil }</code>
3058
- </li>
3059
-
3060
- <li class="never" data-hits="" data-linenumber="13">
3061
-
3062
-
3063
- <code class="ruby"></code>
3064
- </li>
3065
-
3066
- <li class="covered" data-hits="1" data-linenumber="14">
3067
- <span class="hits">1</span>
3068
-
3069
- <code class="ruby"> it &#39;defaults cache time to 86,400 Seconds (24 hours)&#39; do</code>
3070
- </li>
3071
-
3072
- <li class="missed" data-hits="0" data-linenumber="15">
3073
-
3074
-
3075
- <code class="ruby"> expect(described_class.cache_time).to eq(86_400)</code>
3076
- </li>
3077
-
3078
- <li class="never" data-hits="" data-linenumber="16">
3079
-
3080
-
3081
- <code class="ruby"> end</code>
3082
- </li>
3083
-
3084
- <li class="never" data-hits="" data-linenumber="17">
3085
-
3086
-
3087
- <code class="ruby"> end</code>
3088
- </li>
3089
-
3090
- <li class="never" data-hits="" data-linenumber="18">
3091
-
3092
-
3093
- <code class="ruby"></code>
3094
- </li>
3095
-
3096
- <li class="covered" data-hits="1" data-linenumber="19">
3097
- <span class="hits">1</span>
3098
-
3099
- <code class="ruby"> context &#39;when Webdrivers.cache_time is set&#39; do</code>
3100
- </li>
3101
-
3102
- <li class="covered" data-hits="1" data-linenumber="20">
3103
- <span class="hits">1</span>
3104
-
3105
- <code class="ruby"> before { described_class.cache_time = &#39;999&#39; }</code>
3106
- </li>
3107
-
3108
- <li class="never" data-hits="" data-linenumber="21">
3109
-
3110
-
3111
- <code class="ruby"></code>
3112
- </li>
3113
-
3114
- <li class="covered" data-hits="1" data-linenumber="22">
3115
- <span class="hits">1</span>
3116
-
3117
- <code class="ruby"> it &#39;returns user defined cache time&#39; do</code>
3118
- </li>
3119
-
3120
- <li class="missed" data-hits="0" data-linenumber="23">
3121
-
3122
-
3123
- <code class="ruby"> expect(described_class.cache_time).to eq(999)</code>
3124
- </li>
3125
-
3126
- <li class="never" data-hits="" data-linenumber="24">
3127
-
3128
-
3129
- <code class="ruby"> end</code>
3130
- </li>
3131
-
3132
- <li class="never" data-hits="" data-linenumber="25">
3133
-
3134
-
3135
- <code class="ruby"></code>
3136
- </li>
3137
-
3138
- <li class="covered" data-hits="1" data-linenumber="26">
3139
- <span class="hits">1</span>
3140
-
3141
- <code class="ruby"> it &#39;returns cache time as an Integer&#39; do</code>
3142
- </li>
3143
-
3144
- <li class="missed" data-hits="0" data-linenumber="27">
3145
-
3146
-
3147
- <code class="ruby"> expect(described_class.cache_time).to be_an_instance_of(Integer)</code>
3148
- </li>
3149
-
3150
- <li class="never" data-hits="" data-linenumber="28">
3151
-
3152
-
3153
- <code class="ruby"> end</code>
3154
- </li>
3155
-
3156
- <li class="never" data-hits="" data-linenumber="29">
3157
-
3158
-
3159
- <code class="ruby"> end</code>
3160
- </li>
3161
-
3162
- <li class="never" data-hits="" data-linenumber="30">
3163
-
3164
-
3165
- <code class="ruby"></code>
3166
- </li>
3167
-
3168
- <li class="covered" data-hits="1" data-linenumber="31">
3169
- <span class="hits">1</span>
3170
-
3171
- <code class="ruby"> context &#39;when ENV variable WD_CACHE_TIME is set&#39; do</code>
3172
- </li>
3173
-
3174
- <li class="covered" data-hits="1" data-linenumber="32">
3175
- <span class="hits">1</span>
3176
-
3177
- <code class="ruby"> before { described_class.cache_time = 3600 }</code>
3178
- </li>
3179
-
3180
- <li class="never" data-hits="" data-linenumber="33">
3181
-
3182
-
3183
- <code class="ruby"></code>
3184
- </li>
3185
-
3186
- <li class="covered" data-hits="1" data-linenumber="34">
3187
- <span class="hits">1</span>
3188
-
3189
- <code class="ruby"> it &#39;uses cache time value from Webdrivers.cache_time over the ENV variable value&#39; do</code>
3190
- </li>
3191
-
3192
- <li class="missed" data-hits="0" data-linenumber="35">
3193
-
3194
-
3195
- <code class="ruby"> allow(ENV).to receive(:[]).with(&#39;WD_CACHE_TIME&#39;).and_return(900)</code>
3196
- </li>
3197
-
3198
- <li class="missed" data-hits="0" data-linenumber="36">
3199
-
3200
-
3201
- <code class="ruby"> expect(described_class.cache_time).to be(3600)</code>
3202
- </li>
3203
-
3204
- <li class="never" data-hits="" data-linenumber="37">
3205
-
3206
-
3207
- <code class="ruby"> end</code>
3208
- </li>
3209
-
3210
- <li class="never" data-hits="" data-linenumber="38">
3211
-
3212
-
3213
- <code class="ruby"></code>
3214
- </li>
3215
-
3216
- <li class="covered" data-hits="1" data-linenumber="39">
3217
- <span class="hits">1</span>
3218
-
3219
- <code class="ruby"> it &#39;returns cache time as an Integer&#39; do</code>
3220
- </li>
3221
-
3222
- <li class="missed" data-hits="0" data-linenumber="40">
3223
-
3224
-
3225
- <code class="ruby"> allow(ENV).to receive(:fetch).with(&#39;WD_CACHE_TIME&#39;, 3600).and_return(&#39;999&#39;)</code>
3226
- </li>
3227
-
3228
- <li class="missed" data-hits="0" data-linenumber="41">
3229
-
3230
-
3231
- <code class="ruby"> expect(described_class.cache_time).to be_an_instance_of(Integer)</code>
3232
- </li>
3233
-
3234
- <li class="never" data-hits="" data-linenumber="42">
3235
-
3236
-
3237
- <code class="ruby"> end</code>
3238
- </li>
3239
-
3240
- <li class="never" data-hits="" data-linenumber="43">
3241
-
3242
-
3243
- <code class="ruby"> end</code>
3244
- </li>
3245
-
3246
- <li class="never" data-hits="" data-linenumber="44">
3247
-
3248
-
3249
- <code class="ruby"> end</code>
3250
- </li>
3251
-
3252
- <li class="never" data-hits="" data-linenumber="45">
3253
-
3254
-
3255
- <code class="ruby"></code>
3256
- </li>
3257
-
3258
- <li class="covered" data-hits="1" data-linenumber="46">
3259
- <span class="hits">1</span>
3260
-
3261
- <code class="ruby"> describe &#39;#install_dir&#39; do</code>
3262
- </li>
3263
-
3264
- <li class="covered" data-hits="1" data-linenumber="47">
3265
- <span class="hits">1</span>
3266
-
3267
- <code class="ruby"> it &#39;uses ~/.webdrivers as default value&#39; do</code>
3268
- </li>
3269
-
3270
- <li class="missed" data-hits="0" data-linenumber="48">
3271
-
3272
-
3273
- <code class="ruby"> expect(described_class.install_dir).to include(&#39;.webdriver&#39;)</code>
3274
- </li>
3275
-
3276
- <li class="never" data-hits="" data-linenumber="49">
3277
-
3278
-
3279
- <code class="ruby"> end</code>
3280
- </li>
3281
-
3282
- <li class="never" data-hits="" data-linenumber="50">
3283
-
3284
-
3285
- <code class="ruby"></code>
3286
- </li>
3287
-
3288
- <li class="covered" data-hits="1" data-linenumber="51">
3289
- <span class="hits">1</span>
3290
-
3291
- <code class="ruby"> it &#39;uses provided value&#39; do</code>
3292
- </li>
3293
-
3294
- <li class="never" data-hits="" data-linenumber="52">
3295
-
3296
-
3297
- <code class="ruby"> begin</code>
3298
- </li>
3299
-
3300
- <li class="missed" data-hits="0" data-linenumber="53">
3301
-
3302
-
3303
- <code class="ruby"> install_dir = File.expand_path(File.join(ENV[&#39;HOME&#39;], &#39;.webdrivers2&#39;))</code>
3304
- </li>
3305
-
3306
- <li class="missed" data-hits="0" data-linenumber="54">
3307
-
3308
-
3309
- <code class="ruby"> described_class.install_dir = install_dir</code>
3310
- </li>
3311
-
3312
- <li class="never" data-hits="" data-linenumber="55">
3313
-
3314
-
3315
- <code class="ruby"></code>
3316
- </li>
3317
-
3318
- <li class="missed" data-hits="0" data-linenumber="56">
3319
-
3320
-
3321
- <code class="ruby"> expect(described_class.install_dir).to eq install_dir</code>
3322
- </li>
3323
-
3324
- <li class="never" data-hits="" data-linenumber="57">
3325
-
3326
-
3327
- <code class="ruby"> ensure</code>
3328
- </li>
3329
-
3330
- <li class="missed" data-hits="0" data-linenumber="58">
3331
-
3332
-
3333
- <code class="ruby"> described_class.install_dir = nil</code>
3334
- </li>
3335
-
3336
- <li class="never" data-hits="" data-linenumber="59">
3337
-
3338
-
3339
- <code class="ruby"> end</code>
3340
- </li>
3341
-
3342
- <li class="never" data-hits="" data-linenumber="60">
3343
-
3344
-
3345
- <code class="ruby"> end</code>
3346
- </li>
3347
-
3348
- <li class="never" data-hits="" data-linenumber="61">
3349
-
3350
-
3351
- <code class="ruby"></code>
3352
- </li>
3353
-
3354
- <li class="covered" data-hits="1" data-linenumber="62">
3355
- <span class="hits">1</span>
3356
-
3357
- <code class="ruby"> context &#39;when ENV variable WD_INSTALL_DIR is set and Webdrivers.install_dir is not&#39; do</code>
3358
- </li>
3359
-
3360
- <li class="covered" data-hits="1" data-linenumber="63">
3361
- <span class="hits">1</span>
3362
-
3363
- <code class="ruby"> it &#39;uses path from the ENV variable&#39; do</code>
3364
- </li>
3365
-
3366
- <li class="never" data-hits="" data-linenumber="64">
3367
-
3368
-
3369
- <code class="ruby"> begin</code>
3370
- </li>
3371
-
3372
- <li class="missed" data-hits="0" data-linenumber="65">
3373
-
3374
-
3375
- <code class="ruby"> described_class.install_dir = nil</code>
3376
- </li>
3377
-
3378
- <li class="missed" data-hits="0" data-linenumber="66">
3379
-
3380
-
3381
- <code class="ruby"> allow(ENV).to receive(:[]).with(&#39;WD_INSTALL_DIR&#39;).and_return(&#39;custom_dir&#39;)</code>
3382
- </li>
3383
-
3384
- <li class="missed" data-hits="0" data-linenumber="67">
3385
-
3386
-
3387
- <code class="ruby"> expect(described_class.install_dir).to be(&#39;custom_dir&#39;)</code>
3388
- </li>
3389
-
3390
- <li class="never" data-hits="" data-linenumber="68">
3391
-
3392
-
3393
- <code class="ruby"> ensure</code>
3394
- </li>
3395
-
3396
- <li class="missed" data-hits="0" data-linenumber="69">
3397
-
3398
-
3399
- <code class="ruby"> described_class.install_dir = nil</code>
3400
- </li>
3401
-
3402
- <li class="never" data-hits="" data-linenumber="70">
3403
-
3404
-
3405
- <code class="ruby"> end</code>
3406
- </li>
3407
-
3408
- <li class="never" data-hits="" data-linenumber="71">
3409
-
3410
-
3411
- <code class="ruby"> end</code>
3412
- </li>
3413
-
3414
- <li class="never" data-hits="" data-linenumber="72">
3415
-
3416
-
3417
- <code class="ruby"> end</code>
3418
- </li>
3419
-
3420
- <li class="never" data-hits="" data-linenumber="73">
3421
-
3422
-
3423
- <code class="ruby"></code>
3424
- </li>
3425
-
3426
- <li class="covered" data-hits="1" data-linenumber="74">
3427
- <span class="hits">1</span>
3428
-
3429
- <code class="ruby"> context &#39;when both ENV variable WD_INSTALL_DIR and Webdrivers.install_dir are set&#39; do</code>
3430
- </li>
3431
-
3432
- <li class="covered" data-hits="1" data-linenumber="75">
3433
- <span class="hits">1</span>
3434
-
3435
- <code class="ruby"> it &#39;uses path from Webdrivers.install_dir&#39; do</code>
3436
- </li>
3437
-
3438
- <li class="never" data-hits="" data-linenumber="76">
3439
-
3440
-
3441
- <code class="ruby"> begin</code>
3442
- </li>
3443
-
3444
- <li class="missed" data-hits="0" data-linenumber="77">
3445
-
3446
-
3447
- <code class="ruby"> described_class.install_dir = &#39;my_install_dir_path&#39;</code>
3448
- </li>
3449
-
3450
- <li class="missed" data-hits="0" data-linenumber="78">
3451
-
3452
-
3453
- <code class="ruby"> allow(ENV).to receive(:[]).with(&#39;WD_INSTALL_DIR&#39;).and_return(&#39;my_env_path&#39;)</code>
3454
- </li>
3455
-
3456
- <li class="missed" data-hits="0" data-linenumber="79">
3457
-
3458
-
3459
- <code class="ruby"> expect(described_class.install_dir).to be(described_class.install_dir)</code>
3460
- </li>
3461
-
3462
- <li class="never" data-hits="" data-linenumber="80">
3463
-
3464
-
3465
- <code class="ruby"> ensure</code>
3466
- </li>
3467
-
3468
- <li class="missed" data-hits="0" data-linenumber="81">
3469
-
3470
-
3471
- <code class="ruby"> described_class.install_dir = nil</code>
3472
- </li>
3473
-
3474
- <li class="never" data-hits="" data-linenumber="82">
3475
-
3476
-
3477
- <code class="ruby"> end</code>
3478
- </li>
3479
-
3480
- <li class="never" data-hits="" data-linenumber="83">
3481
-
3482
-
3483
- <code class="ruby"> end</code>
3484
- </li>
3485
-
3486
- <li class="never" data-hits="" data-linenumber="84">
3487
-
3488
-
3489
- <code class="ruby"> end</code>
3490
- </li>
3491
-
3492
- <li class="never" data-hits="" data-linenumber="85">
3493
-
3494
-
3495
- <code class="ruby"> end</code>
3496
- </li>
3497
-
3498
- <li class="never" data-hits="" data-linenumber="86">
3499
-
3500
-
3501
- <code class="ruby">end</code>
3502
- </li>
3503
-
3504
- </ol>
3505
- </pre>
3506
- </div>
3507
-
3508
-
3509
- </div>
3510
- </div>
3511
- </body>
3512
- </html>