Commit 8cbb7585

luu <luuduong@gmail.com>
2014-11-29 16:48:16
switch from selenium web driver to poltergeist.
1 parent ab1b3b3
spec/rails_helper.rb
@@ -3,6 +3,7 @@ ENV["RAILS_ENV"] ||= 'test'
 require 'spec_helper'
 require File.expand_path("../../config/environment", __FILE__)
 require 'rspec/rails'
+require 'capybara/poltergeist'
 
 # Requires supporting ruby files with custom matchers and macros, etc, in
 # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
@@ -16,6 +17,7 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
 # Checks for pending migrations before tests are run.
 # If you are not using ActiveRecord, you can remove this line.
 ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
+Capybara.javascript_driver = :poltergeist
 
 RSpec.configure do |config|
   # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
Gemfile
@@ -65,11 +65,10 @@ group :development, :test do
   gem 'teaspoon'
   gem 'database_cleaner'
   gem 'factory_girl_rails'
-  gem 'capybara'
   gem 'simplecov'
   gem 'ffaker'
-  gem 'selenium-webdriver'
   gem 'poltergeist'
+  gem 'phantomjs', :require => 'phantomjs/poltergeist'
   gem 'binding_of_caller'
   gem 'foreman'
 end
Gemfile.lock
@@ -83,8 +83,6 @@ GEM
       rack-test (>= 0.5.4)
       xpath (~> 2.0)
     chartkick (1.3.2)
-    childprocess (0.5.5)
-      ffi (~> 1.0, >= 1.0.11)
     cliver (0.3.2)
     coderay (1.1.0)
     coffee-rails (4.1.0)
@@ -132,7 +130,6 @@ GEM
     faraday (0.9.0)
       multipart-post (>= 1.2, < 3)
     ffaker (1.25.0)
-    ffi (1.9.6)
     fission (0.5.0)
       CFPropertyList (~> 2.2)
     fog (1.25.0)
@@ -260,6 +257,7 @@ GEM
       nokogiri
       rbvmomi
     pg (0.17.1)
+    phantomjs (1.9.7.1)
     poltergeist (1.5.1)
       capybara (~> 2.1)
       cliver (~> 0.3.1)
@@ -318,7 +316,6 @@ GEM
       rspec-mocks (~> 3.1.0)
       rspec-support (~> 3.1.0)
     rspec-support (3.1.2)
-    rubyzip (1.1.6)
     safe_yaml (1.0.4)
     sass (3.2.19)
     sass-rails (4.0.4)
@@ -329,11 +326,6 @@ GEM
     sdoc (0.4.1)
       json (~> 1.7, >= 1.7.7)
       rdoc (~> 4.0)
-    selenium-webdriver (2.44.0)
-      childprocess (~> 0.5)
-      multi_json (~> 1.0)
-      rubyzip (~> 1.0)
-      websocket (~> 1.0)
     simple_oauth (0.3.0)
     simplecov (0.9.1)
       docile (~> 1.1.0)
@@ -389,7 +381,6 @@ GEM
       rack
       raindrops (~> 0.7)
     uniform_notifier (1.6.2)
-    websocket (1.2.1)
     websocket-driver (0.4.0)
     xpath (2.0.0)
       nokogiri (~> 1.3)
@@ -412,7 +403,6 @@ DEPENDENCIES
   capistrano-bundler (~> 1.1)
   capistrano-rails (~> 1.1)
   capistrano-rbenv (~> 2.0)
-  capybara
   chartkick
   coffee-rails
   curb
@@ -444,6 +434,7 @@ DEPENDENCIES
   mini_magick
   newrelic_rpm
   pg
+  phantomjs
   poltergeist
   pry-rails
   rack-attack
@@ -452,7 +443,6 @@ DEPENDENCIES
   rspec-rails
   sass-rails
   sdoc (~> 0.4.0)
-  selenium-webdriver
   simplecov
   spank
   spring