Merge pull request #473 from bear454/phantomjs

Use phantomjs gem to demonstrate phantomjs is a dependency, and autoinstall it.
This commit is contained in:
James Mason 2014-08-19 14:24:04 -07:00
commit 0e0415d515
3 changed files with 5 additions and 1 deletions

View file

@ -130,6 +130,7 @@ group :test do
gem 'capybara' gem 'capybara'
gem 'database_cleaner' gem 'database_cleaner'
gem 'poltergeist' gem 'poltergeist'
gem 'phantomjs', :require => 'phantomjs/poltergeist'
# Set of rails validations matchers to describe models # Set of rails validations matchers to describe models
gem 'shoulda' gem 'shoulda'
# Extracted from RSpec 3 stub_model and mock_model # Extracted from RSpec 3 stub_model and mock_model

View file

@ -241,6 +241,7 @@ GEM
ast (>= 1.1, < 3.0) ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5) slop (~> 3.4, >= 3.4.5)
pdf-core (0.2.5) pdf-core (0.2.5)
phantomjs (1.9.7.1)
poltergeist (1.5.1) poltergeist (1.5.1)
capybara (~> 2.1) capybara (~> 2.1)
cliver (~> 0.3.1) cliver (~> 0.3.1)
@ -443,6 +444,7 @@ DEPENDENCIES
omniauth-openid omniauth-openid
paper_trail paper_trail
paperclip paperclip
phantomjs
poltergeist poltergeist
prawn_rails prawn_rails
protected_attributes protected_attributes

View file

@ -19,6 +19,7 @@ ActiveRecord::Migration.maintain_test_schema!
# Add poltergeist to use it as JS driver # Add poltergeist to use it as JS driver
require 'capybara/poltergeist' require 'capybara/poltergeist'
require 'phantomjs'
# Requires supporting ruby files with custom matchers and macros, etc, in # Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
@ -65,7 +66,7 @@ RSpec.configure do |config|
Capybara.javascript_driver = :poltergeist Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app| 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 end
# Includes helpers and connect them to specific types of tests # Includes helpers and connect them to specific types of tests