diff --git a/Gemfile b/Gemfile index 26e4e195def676c6a025d219538ed6880a04a12f..e8b0b244d1e0d5aa5b8fe3c9774ed01ca22ccb77 100644 --- a/Gemfile +++ b/Gemfile @@ -101,6 +101,7 @@ group :development, :test do gem "rspec-rails" gem "capybara" gem "capybara-webkit" + gem "headless" gem "autotest" gem "autotest-rails" gem "pry" diff --git a/Gemfile.lock b/Gemfile.lock index 57ad193512eaa1e2e2251fe0f551a92099eff612..b23bc47c1d2485b99805bdba0c7222fa58aa0172 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -186,6 +186,7 @@ GEM railties (~> 3.0) hashery (1.4.0) hashie (1.2.0) + headless (0.3.1) hike (1.2.1) httparty (0.8.3) multi_json (~> 1.0) @@ -398,6 +399,7 @@ DEPENDENCIES grape (~> 0.2.1) grit! haml-rails + headless httparty jquery-rails (= 2.0.2) jquery-ui-rails (= 0.5.0) diff --git a/features/support/env.rb b/features/support/env.rb index b47349c8ea724a805f4a1b4b0e24d859b9746c7b..496f23f98948acc237872893b621de64a14d2d65 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -39,3 +39,8 @@ rescue NameError end Cucumber::Rails::Database.javascript_strategy = :truncation + +require 'headless' + +headless = Headless.new +headless.start diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f87c9a50f869cd98b78a085478f881774d00163a..5c0bb618754a0b062f9fd9fc85613a71521efa8d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -12,6 +12,7 @@ require 'webmock/rspec' require 'factories' require 'monkeypatch' require 'email_spec' +require 'headless' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. @@ -30,6 +31,11 @@ RSpec.configure do |config| # instead of true. config.use_transactional_fixtures = false + config.before :all do + headless = Headless.new + headless.start + end + config.before :each, type: :integration do DeviseSessionMock.disable end