Sha256: 70ca42a16c12a08e9c94c56795e557ca77a04da53bbdebfb404ddef5faa0527b

Contents?: true

Size: 741 Bytes

Versions: 2

Compression:

Stored size: 741 Bytes

Contents

# frozen_string_literal: true

require "bundler/setup"

Bundler.require :default, :development

Dir["#{__dir__}/support/**/*.rb"].sort.each { |file| require file }

Combustion.initialize! :active_record
ActiveSupport.run_load_hooks :gutentag unless defined?(Gutentag::Engine)

require "rspec/rails"

RSpec.configure do |config|
  config.disable_monkey_patching!

  if config.respond_to?(:use_transactional_tests)
    config.use_transactional_tests = false
  else
    config.use_transactional_fixtures = false
  end

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

  config.around(:each) do |example|
    DatabaseCleaner.cleaning do
      example.run
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gutentag-2.5.4 spec/spec_helper.rb
gutentag-2.5.3 spec/spec_helper.rb