Per https://github.com/jonleighton/poltergeist#remote-debugging-experimental, this code is experimental:
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, inspector: true)
end
If I remove it, then zeus rspec spec/
returns control back to the shell.
The solution is to register the experimental code as a separate driver called :poltergeist_debug
:
Capybara.register_driver :poltergeist_debug do |app|
Capybara::Poltergeist::Driver.new(app, inspector: true)
end
Capybara.javascript_driver = :poltergeist
and only use that driver on an ad hoc basis when I need to inspect the state of the web browser
require 'spec_helper'
Capybara.javascript_driver = :poltergeist_debug
describe "users index" do
before { visit root_path }
it "should not hang", js: true do
page.driver.debug
expect(page).to have_content("Welcome")
end
end
and debug the spec outside of zeus