Sha256: 4970294e67d339adab34a8e9251a9983a8b53ae3eab0167f086a54058d05f2c4

Contents?: true

Size: 902 Bytes

Versions: 8

Compression:

Stored size: 902 Bytes

Contents

ENV['RAILS_ENV'] ||= 'test'
require 'spec_helper'
Dir[__dir__ + '/helpers/*.rb'].each {|file| require file }

ActiveRecord::Migration.maintain_test_schema!

Capybara.javascript_driver = :selenium_chrome_headless # :selenium_chrome
Capybara.server = :puma

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods
  config.include Capybara::DSL
  config.include SpecHelpers::Wait

  config.use_transactional_fixtures = true
  config.infer_spec_type_from_file_location!

  config.filter_run focus: true
  config.run_all_when_everything_filtered = true

  config.before(:suite) do
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.clean
    DatabaseCleaner.strategy = :deletion
  end

  config.before(:each) do
    DatabaseCleaner.start
    DatabaseCleaner.clean
  end

  config.after(:suite) do
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.clean
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
live_record-0.3.3 spec/rails_helper.rb
live_record-0.3.2 spec/rails_helper.rb
live_record-0.2.8 spec/rails_helper.rb
live_record-0.2.7 spec/rails_helper.rb
live_record-0.2.6 spec/rails_helper.rb
live_record-0.2.5 spec/rails_helper.rb
live_record-0.2.4 spec/rails_helper.rb
live_record-0.2.3 spec/rails_helper.rb