testdouble / cypress-rails

Helps you write Cypress tests of your Rails app
Other
321 stars 48 forks source link

Fix deprecation warning for clear_active_connections! call #157

Closed mhoofman closed 1 year ago

mhoofman commented 1 year ago

This one-liner fixes a Rails deprecation warning that has been popping up in my recent builds:

DEPRECATION WARNING: Calling `ActiveRecord::Base.clear_active_connections! is deprecated. Please call the method directly on the connection handler; for example: `ActiveRecord::Base.connection_handler.clear_active_connections!`. (called from rollback_transaction at /path/to/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cypress-rails-0.6.0/lib/cypress-rails/manages_transactions.rb:49)

Looks like this deprecation was added to Rails circa September 2022, https://github.com/rails/rails/pull/45924

searls commented 1 year ago

Thanks! Released as 0.6.1