I\'m getting a similar error in a number of tests when I add \":js => true\" to them. eg:
An error occurred in an after hook
ActionController::Rout
In my case, the default missing image was set to point to s3. I didn't really care if the image was loaded or not. PhantomJs
has an option to disable image loading via the command line arg --load-images=no
.
In Poltergeist
, this can be setup when registering the driver:
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, :phantomjs_options => ['--load-images=no'])
end