Skip to content

Commit 55f4340

Browse files
odlproute
authored andcommitted
Fix spec helper on MacOS
If the detected path to Chrome includes spaces (which is does by default on MacOS) then the version check command would fail, preventing the test suite from running.
1 parent 575ef9c commit 55f4340

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/spec_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
$LOAD_PATH.unshift("#{CUPRITE_ROOT}/lib")
55

66
require "fileutils"
7+
require "shellwords"
78
require "bundler/setup"
89
require "rspec"
910

@@ -15,7 +16,7 @@
1516

1617
puts ""
1718
command = Ferrum::Browser::Command.build(Ferrum::Browser::Options.new, nil)
18-
puts `'#{command.path}' --version`
19+
puts `'#{Shellwords.escape(command.path)}' --version`
1920
puts ""
2021

2122
Capybara.save_path = File.join(CUPRITE_ROOT, "spec", "tmp", "save_path")

0 commit comments

Comments
 (0)