File tree Expand file tree Collapse file tree 7 files changed +29
-16
lines changed Expand file tree Collapse file tree 7 files changed +29
-16
lines changed Original file line number Diff line number Diff line change 5151 rails_version : " 8.0.0"
5252 - ruby_version : " 3.4"
5353 rails_version : " 8.0.0"
54+ - ruby_version : " 3.4"
55+ rails_version : " 8.1.0"
5456 - ruby_version : " 3.2"
5557 rails_version : 7.1.0
5658 options :
Original file line number Diff line number Diff line change @@ -30,16 +30,18 @@ rails_version = Gem::Version.new(rails_version)
3030
3131gem "rails" , "~> #{ rails_version } "
3232
33- if rails_version >= Gem ::Version . new ( "8.0.0" )
34- gem "rspec-rails"
33+ if rails_version >= Gem ::Version . new ( "8.1.0" )
34+ gem "rspec-rails" , "~> 8.0.0"
35+ gem "sqlite3" , "~> 2.1.1" , platform : :ruby
36+ elsif rails_version >= Gem ::Version . new ( "8.0.0" )
37+ gem "rspec-rails" , "~> 8.0.0"
3538 gem "sqlite3" , "~> 2.1.1" , platform : :ruby
3639elsif rails_version >= Gem ::Version . new ( "7.1.0" )
3740 gem "psych" , "~> 4.0.0"
38- gem "rspec-rails"
41+ gem "rspec-rails" , "~> 7.0"
3942 gem "sqlite3" , "~> 1.7.3" , platform : :ruby
4043elsif rails_version >= Gem ::Version . new ( "6.1.0" )
41- gem "rspec-rails" , "~> 4.0"
42-
44+ gem "rspec-rails" , "~> 6.0"
4345 gem "sqlite3" , "~> 1.7.3" , platform : :ruby
4446else
4547 gem "psych" , "~> 3.0.0"
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ require 'optparse'
2424require 'fileutils'
2525
2626class RailsVersionTester
27- SUPPORTED_VERSIONS = %w[ 5.0 5.1 5. 2 6.0 6.1 7.0 7.1 7.2 8.0 ] . freeze
27+ SUPPORTED_VERSIONS = %w[ 5.2 6.0 6.1 7.0 7.1 7.2 8.0 8.1 ] . freeze
2828
2929 def initialize
3030 @options = { }
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,10 @@ 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+ if ActiveSupport . respond_to? ( :filter_parameters )
35+ ActiveSupport . filter_parameters . clear
36+ end
3337end
3438
3539def configure_app ( app )
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ 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+ if ActiveSupport . respond_to? ( :filter_parameters )
35+ ActiveSupport . filter_parameters . clear
36+ end
3337end
3438
3539def 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