Sha256: 8770947b2488d2a742120ca36c2adac3f57e6a9d538f70f20125773c38ee7cc1

Contents?: true

Size: 1.04 KB

Versions: 20

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true
ENV['RACK_ENV'] = 'test'

require File.expand_path('../../config/environment', __FILE__)
abort('DATABASE_URL environment variable is set') if ENV['DATABASE_URL']

require 'rspec/rails'
require 'spec_helper'

Dir[Rails.root.join('spec/support/**/*.rb')].sort.each { |file| require file }

module Features
  # Extend this module in spec/support/features/*.rb
  include Formulaic::Dsl
end

RSpec.configure do |config|
  config.include Features, type: :feature
  config.infer_base_class_for_anonymous_controllers = false
  config.infer_spec_type_from_file_location!
  config.use_transactional_fixtures = false
end

ActiveRecord::Migration.maintain_test_schema!

Rails.logger.level = 4

# Improves performance by forcing the garbage collector to run less often.
unless ENV['DEFER_GC'] == '0' || ENV['DEFER_GC'] == 'false'
  require 'support/deferred_garbage_collection'
  RSpec.configure do |config|
    config.before(:all) { DeferredGarbageCollection.start }
    config.after(:all)  { DeferredGarbageCollection.reconsider }
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
onotole-2.0.2 templates/rails_helper.rb
onotole-2.0.1 templates/rails_helper.rb
onotole-2.0.0 templates/rails_helper.rb
onotole-1.2.11 templates/rails_helper.rb
onotole-1.2.10 templates/rails_helper.rb
onotole-1.2.9 templates/rails_helper.rb
onotole-1.2.8 templates/rails_helper.rb
onotole-1.2.7 templates/rails_helper.rb
onotole-1.2.6 templates/rails_helper.rb
onotole-1.2.5 templates/rails_helper.rb
onotole-1.2.4 templates/rails_helper.rb
onotole-1.2.3 templates/rails_helper.rb
onotole-1.2.2 templates/rails_helper.rb
onotole-1.2.1 templates/rails_helper.rb
onotole-1.1.21 templates/rails_helper.rb
onotole-1.1.20 templates/rails_helper.rb
onotole-1.1.19 templates/rails_helper.rb
onotole-1.1.18 templates/rails_helper.rb
onotole-1.1.17 templates/rails_helper.rb
onotole-1.1.16 templates/rails_helper.rb