Skip to content

Commit

Permalink
Fix spec helper on MacOS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
odlp authored and route committed Nov 20, 2022
1 parent 575ef9c commit 55f4340
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
$LOAD_PATH.unshift("#{CUPRITE_ROOT}/lib")

require "fileutils"
require "shellwords"
require "bundler/setup"
require "rspec"

Expand All @@ -15,7 +16,7 @@

puts ""
command = Ferrum::Browser::Command.build(Ferrum::Browser::Options.new, nil)
puts `'#{command.path}' --version`
puts `'#{Shellwords.escape(command.path)}' --version`
puts ""

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

0 comments on commit 55f4340

Please sign in to comment.