Use phantomjs gem to demonstrate phantomjs is a dependency, and autoinstall phantomjs.
This commit is contained in:
parent
89c77fa33b
commit
2b0d7b880b
3 changed files with 5 additions and 1 deletions
|
|
@ -19,6 +19,7 @@ ActiveRecord::Migration.maintain_test_schema!
|
|||
|
||||
# Add poltergeist to use it as JS driver
|
||||
require 'capybara/poltergeist'
|
||||
require 'phantomjs'
|
||||
|
||||
# Requires supporting ruby files with custom matchers and macros, etc, in
|
||||
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
||||
|
|
@ -65,7 +66,7 @@ RSpec.configure do |config|
|
|||
Capybara.javascript_driver = :poltergeist
|
||||
|
||||
Capybara.register_driver :poltergeist do |app|
|
||||
Capybara::Poltergeist::Driver.new(app, js_errors: false)
|
||||
Capybara::Poltergeist::Driver.new(app, phantomjs: Phantomjs.path, js_errors: false)
|
||||
end
|
||||
|
||||
# Includes helpers and connect them to specific types of tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue