The setup in spec_helper.rb
is:
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, { js_errors: true })
end
Capybara.javascript_driver = :poltergeist
Then in the scenario
I have:
save_screenshot('tmp/screenshot.png', :full => true)
One more thing. The fonts aren't good. I'm using Google font, but it's not rendered correctly only in Poltergeist.
%link{href: "http://fonts.googleapis.com/css?family=Open+Sans:400,300", rel: "stylesheet", type: "text/css"}
As a result, whole page looks broken. Am I missing some configuration?