diff --git a/config/environments/test.rb b/config/environments/test.rb index 4cb00ebe24..e7388b07af 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -18,6 +18,8 @@ # recommended that you enable it in continuous integration systems to ensure eager # loading is working properly before deploying your code. config.eager_load = ENV["CI"].present? + # cache classes on CI, but enable reloading for local work (bin/rspec) + config.enable_reloading = ENV["CI"].blank? # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index f347fcf3d5..8243e8f03f 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -65,7 +65,13 @@ config.example_status_persistence_file_path = "#{::Rails.root}/tmp/persistent_examples.txt" + # Filter backtraces to gems that are not under our control. + # Can override using `--backtrace` option to rspec to see full backtraces. config.filter_rails_from_backtrace! + config.filter_gems_from_backtrace(*%w[ + bootsnap capybara factory_bot puma rack railties shoulda-matchers + sprockets-rails pundit + ]) config.disable_monkey_patching!