# frozen_string_literal: true require "spec_helper" ENV["RAILS_ENV"] ||= "test" require_relative "dummy/config/environment" # Prevent database truncation if the environment is production abort("The Rails environment is running in production mode!") if Rails.env.production? require "rspec/rails" # Add additional requires below this line. Rails is not loaded until this point! Dir[NulogySSO::Engine.root.join("spec/support/**/*.rb")].each { |f| require f } require "nulogy_sso/test_utilities/auth0_mock" require "nulogy_sso/test_utilities/jwt_test_helper" begin ActiveRecord::Migration.maintain_test_schema! rescue ActiveRecord::PendingMigrationError => e puts e.to_s.strip exit 1 end RSpec.configure do |config| config.infer_spec_type_from_file_location! # Filter lines from Rails gems in backtraces. config.filter_rails_from_backtrace! end