I'm trying to figure out how exactly to implement this functionality of Poltergeist into my existing Capybara tests, and I'm not having any luck after reading the documentation here: https://github.com/teampoltergeist/poltergeist
I have included the below code, but when I run my tests I'm not seeing any warning about JS errors when I know there are JS errors in the console. Am I missing something? Do I have to pass in a specific command in the terminal in order to make sure this checks for JS errors? Thanks!
require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
options = {js_errors: true}
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, options)
end