lib/capybara/webmock.rb in capybara-webmock-0.6.0 vs lib/capybara/webmock.rb in capybara-webmock-0.7.0

- old
+ new

@@ -121,11 +121,11 @@ buf end def kill_old_process - return unless File.exists?(pid_file) + return unless File.exist?(pid_file) old_pid = File.read(pid_file).to_i kill_process(old_pid) if old_pid > 1 remove_pid_file end @@ -150,17 +150,17 @@ def process_alive?(pid) !!Process.kill(0, pid) rescue false end def write_pid_file - raise "Pid file #{pid_file} already exists" if File.exists?(pid_file) + raise "Pid file #{pid_file} already exists" if File.exist?(pid_file) FileUtils.mkdir_p(File.dirname(pid_file)) File.write(pid_file, @pid.to_s) end def remove_pid_file - File.delete(pid_file) if File.exists?(pid_file) + File.delete(pid_file) if File.exist?(pid_file) end end end end @@ -172,14 +172,14 @@ Capybara.register_driver :capybara_webmock do |app| Capybara::Selenium::Driver.new(app, browser: :firefox, profile: Capybara::Webmock.firefox_profile) end Capybara.register_driver :capybara_webmock_chrome do |app| - Capybara::Selenium::Driver.new(app, browser: :chrome, options: Capybara::Webmock.chrome_options) + Capybara::Selenium::Driver.new(app, browser: :chrome, capabilities: [Capybara::Webmock.chrome_options]) end Capybara.register_driver :capybara_webmock_chrome_headless do |app| - Capybara::Selenium::Driver.new(app, browser: :chrome, options: Capybara::Webmock.chrome_headless_options) + Capybara::Selenium::Driver.new(app, browser: :chrome, capabilities: [Capybara::Webmock.chrome_headless_options]) end Capybara.register_driver :capybara_webmock_poltergeist do |app| Capybara::Poltergeist::Driver.new(app, phantomjs_options: Capybara::Webmock.phantomjs_options) end