# This file was generated by the `rails generate rspec:install` command.
# See https://guides.rubyonrails.org/testing.html#testing-your-application

require 'simplecov'
SimpleCov.start 'rails' do
  add_filter '/spec/'
  add_filter '/config/'
  add_filter '/vendor/'

  add_group 'Jobs', 'app/jobs'
  add_group 'Models', 'app/models'
  add_group 'Mailers', 'app/mailers'
end

RSpec.configure do |config|
  # Enable flags like --only-failures and --next-failure
  config.example_status_persistence_file_path = ".rspec_status"

  # Disable RSpec exposing methods globally on `Module` and `main`
  config.disable_monkey_patching!

  config.expect_with :rspec do |c|
    c.syntax = :expect
  end

  # Enable the focus inclusion filter and run all when no filter is set
  # This allows you to use `fit`, `fdescribe`, etc. to focus on specific tests
  config.filter_run_when_matching :focus

  # Run specs in random order to surface order dependencies
  config.order = :random
  Kernel.srand config.seed

  # Print the 10 slowest examples and example groups at the end of the run
  config.profile_examples = 10 if config.files_to_run.one?
end
