# frozen_string_literal: true require 'simplecov' SimpleCov.profiles.define 'gem' do add_filter '/spec/' end SimpleCov.start 'gem' require 'zyra' require 'pry-nav' require 'factory_bot' require 'database_cleaner' require 'active_record' ActiveRecord::Base.establish_connection( adapter: 'sqlite3', database: ':memory:' ) support_files = File.expand_path('spec/support/**/*.rb') Dir[support_files].sort.each { |file| require file } RSpec.configure do |config| config.run_all_when_everything_filtered = true config.filter_run :focus config.filter_run_excluding :integration unless ENV['ALL'] config.order = 'random' config.before(:suite) do DatabaseCleaner.strategy = :transaction DatabaseCleaner.clean_with(:truncation) end config.around do |example| DatabaseCleaner.cleaning do example.run end end end RSpec::Matchers.define_negated_matcher :not_change, :change