Commit d656cb74f7e1becdb6ed686a7d36da48ab521030

Authored by randx
1 parent d4059ac9

Headless gem added

@@ -101,6 +101,7 @@ group :development, :test do @@ -101,6 +101,7 @@ group :development, :test do
101 gem "rspec-rails" 101 gem "rspec-rails"
102 gem "capybara" 102 gem "capybara"
103 gem "capybara-webkit" 103 gem "capybara-webkit"
  104 + gem "headless"
104 gem "autotest" 105 gem "autotest"
105 gem "autotest-rails" 106 gem "autotest-rails"
106 gem "pry" 107 gem "pry"
@@ -186,6 +186,7 @@ GEM @@ -186,6 +186,7 @@ GEM
186 railties (~> 3.0) 186 railties (~> 3.0)
187 hashery (1.4.0) 187 hashery (1.4.0)
188 hashie (1.2.0) 188 hashie (1.2.0)
  189 + headless (0.3.1)
189 hike (1.2.1) 190 hike (1.2.1)
190 httparty (0.8.3) 191 httparty (0.8.3)
191 multi_json (~> 1.0) 192 multi_json (~> 1.0)
@@ -398,6 +399,7 @@ DEPENDENCIES @@ -398,6 +399,7 @@ DEPENDENCIES
398 grape (~> 0.2.1) 399 grape (~> 0.2.1)
399 grit! 400 grit!
400 haml-rails 401 haml-rails
  402 + headless
401 httparty 403 httparty
402 jquery-rails (= 2.0.2) 404 jquery-rails (= 2.0.2)
403 jquery-ui-rails (= 0.5.0) 405 jquery-ui-rails (= 0.5.0)
features/support/env.rb
@@ -39,3 +39,8 @@ rescue NameError @@ -39,3 +39,8 @@ rescue NameError
39 end 39 end
40 40
41 Cucumber::Rails::Database.javascript_strategy = :truncation 41 Cucumber::Rails::Database.javascript_strategy = :truncation
  42 +
  43 +require 'headless'
  44 +
  45 +headless = Headless.new
  46 +headless.start
spec/spec_helper.rb
@@ -12,6 +12,7 @@ require 'webmock/rspec' @@ -12,6 +12,7 @@ require 'webmock/rspec'
12 require 'factories' 12 require 'factories'
13 require 'monkeypatch' 13 require 'monkeypatch'
14 require 'email_spec' 14 require 'email_spec'
  15 +require 'headless'
15 16
16 # Requires supporting ruby files with custom matchers and macros, etc, 17 # Requires supporting ruby files with custom matchers and macros, etc,
17 # in spec/support/ and its subdirectories. 18 # in spec/support/ and its subdirectories.
@@ -30,6 +31,11 @@ RSpec.configure do |config| @@ -30,6 +31,11 @@ RSpec.configure do |config|
30 # instead of true. 31 # instead of true.
31 config.use_transactional_fixtures = false 32 config.use_transactional_fixtures = false
32 33
  34 + config.before :all do
  35 + headless = Headless.new
  36 + headless.start
  37 + end
  38 +
33 config.before :each, type: :integration do 39 config.before :each, type: :integration do
34 DeviseSessionMock.disable 40 DeviseSessionMock.disable
35 end 41 end