File tree Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ def self.name
5858 app . config . active_job . queue_adapter = :test
5959 app . config . cache_store = :memory_store
6060 app . config . action_controller . perform_caching = true
61- app . config . filter_parameters += [ :password , :secret ]
6261
6362 # Eager load namespaces can be accumulated after repeated initializations and make initialization
6463 # slower after each run
@@ -70,15 +69,15 @@ def self.name
7069 configure_app ( app )
7170
7271 # Configure parameter filtering for consistent test behavior
73- app . config . filter_parameters . concat (
74- [ :custom_secret ,
75- :api_key ,
76- :credit_card ,
77- :authorization ,
78- :password ,
79- :token ]
80- )
81- app . config . filter_parameters . uniq!
72+ app . config . filter_parameters = [
73+ :password ,
74+ :secret ,
75+ :custom_secret ,
76+ :api_key ,
77+ :credit_card ,
78+ :authorization ,
79+ :token
80+ ]
8281
8382 app . routes . append do
8483 get "/exception" , to : "hello#exception"
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ def run_pre_initialize_cleanup
3030 # Rails 7.1 stores the error reporter directly under the ActiveSupport class.
3131 # So we need to make sure the subscriber is not subscribed unexpectedly before any tests
3232 ActiveSupport . error_reporter . unsubscribe ( Sentry ::Rails ::ErrorSubscriber )
33+
34+ ActiveSupport . filter_parameters . clear
3335end
3436
3537def configure_app ( app )
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ def run_pre_initialize_cleanup
3030 # Rails 7.1 stores the error reporter directly under the ActiveSupport class.
3131 # So we need to make sure the subscriber is not subscribed unexpectedly before any tests
3232 ActiveSupport . error_reporter . unsubscribe ( Sentry ::Rails ::ErrorSubscriber )
33+
34+ ActiveSupport . filter_parameters . clear
3335end
3436
3537def configure_app ( app )
Original file line number Diff line number Diff line change 6464 end
6565
6666 reset_sentry_globals!
67+
68+ Rails . application = nil
6769 end
6870
6971 config . before :each do
You can’t perform that action at this time.
0 commit comments