diff --git a/Gemfile b/Gemfile index c9d5c4e..b9f1fbe 100644 --- a/Gemfile +++ b/Gemfile @@ -28,7 +28,8 @@ group :test do gem 'rspec-rails' gem 'generator_spec' gem 'capybara' - gem 'capybara-webkit' + gem 'geckodriver-helper' + gem 'selenium-webdriver' gem 'rswag-specs', path: './rswag-specs' end diff --git a/test-app/db/schema.rb b/test-app/db/schema.rb index 8accba1..e01f8f3 100644 --- a/test-app/db/schema.rb +++ b/test-app/db/schema.rb @@ -2,15 +2,15 @@ # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). +# This file is the source Rails uses to define your schema when running `rails +# db:schema:load`. When creating a new database, `rails db:schema:load` tends to +# be faster and is potentially less error prone than running all of your +# migrations from scratch. Old migrations may fail to apply correctly if those +# migrations use external dependencies or application code. # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160218212104) do +ActiveRecord::Schema.define(version: 2016_02_18_212104) do create_table "blogs", force: :cascade do |t| t.string "title" diff --git a/test-app/spec/rails_helper.rb b/test-app/spec/rails_helper.rb index 98c8fc3..3d9bd5f 100644 --- a/test-app/spec/rails_helper.rb +++ b/test-app/spec/rails_helper.rb @@ -51,9 +51,12 @@ RSpec.configure do |config| # arbitrary gems may also be filtered via: # config.filter_gems_from_backtrace("gem name") - Capybara.javascript_driver = :webkit -end + Capybara.register_driver :firefox_headless do |app| + options = ::Selenium::WebDriver::Firefox::Options.new + options.args << '--headless' -Capybara::Webkit.configure do |config| - config.block_unknown_urls + Capybara::Selenium::Driver.new(app, browser: :firefox, options: options) + end + + Capybara.javascript_driver = :firefox_headless end