Why is Poltergeist not registered as a driver for Capybara when used with Guard/Konacha? Why is Poltergeist not registered as a driver for Capybara when used with Guard/Konacha? selenium selenium

Why is Poltergeist not registered as a driver for Capybara when used with Guard/Konacha?


I found a solution which works, but it seems a little hacky, so if anyone wants to suggest something better I'm all ears. I realized that the Konacha initializer is not being loaded until after Guard loads Konacha, so I had to replicate the registration of the Capybara::Poltergeist driver in the Guardfile:

require 'capybara/poltergeist'Capybara.register_driver :poltergeist do |app|  Capybara::Poltergeist::Driver.new(app, {:js_errors => true})endguard :konacha, driver: :poltergeist do  watch(%r{^app/assets/javascripts/(.*)\.js(\.coffee)?$}) { |m| "#{m[1]}_spec.js" }  watch(%r{^spec/javascripts/.+_spec(\.js|\.js\.coffee)$})end