Sha256: 4371cab19fed3b6a51a03783c40d8944d82bd97533d81d3ac4aac52239d0d252

Contents?: true

Size: 886 Bytes

Versions: 14

Compression:

Stored size: 886 Bytes

Contents

ENV['RAILS_ENV'] ||= 'test'

PROJECT_ROOT = File.expand_path('../../..', __FILE__)
$LOAD_PATH << File.join(PROJECT_ROOT, 'lib')

require 'rails/all'
require 'rails/test_help'

Bundler.require

require 'aruba/cucumber'
require 'clearance/testing/application'
require 'cucumber/rails/action_controller'
require 'cucumber/rails/application'
require 'cucumber/rails/capybara'
require 'cucumber/rails/database'
require 'cucumber/rails/hooks'
require 'cucumber/rails/world'

ActionController::Base.allow_rescue = false
Capybara.default_selector = :css
Capybara.save_and_open_page_path = 'tmp'
Clearance::Testing::Application.initialize!

begin
  DatabaseCleaner.strategy = :transaction
rescue NameError
  raise 'You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it.'
end

Around do |scenario, block|
  Bundler.with_clean_env do
    block.call
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
clearance-1.6.0 features/support/env.rb
clearance-1.5.1 features/support/env.rb
clearance-1.5.0 features/support/env.rb
clearance-1.4.3 features/support/env.rb
clearance-1.4.2 features/support/env.rb
clearance-1.4.1 features/support/env.rb
clearance-1.4.0 features/support/env.rb
clearance-1.3.0 features/support/env.rb
clearance-1.2.1 features/support/env.rb
clearance-1.2.0 features/support/env.rb
clearance-1.1.0 features/support/env.rb
clearance-1.0.1 features/support/env.rb
clearance-1.0.0 features/support/env.rb
clearance-1.0.0.rc8 features/support/env.rb