Prevent the clearing of instance variables after each test request with Rails 7

This commit is contained in:
Jolyon Pawlyn 2021-12-16 15:15:40 +02:00
parent c1acc24b31
commit 5d64851ad0
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
# HACK: to prevent the resetting of instance variables after each request in Rails 7
# see https://github.com/rails/rails/pull/43735
if Rails::VERSION::MAJOR >= 7
module ActionController
module Testing
module Functional
def clear_instance_variables_between_requests; end
end
end
end
end

View File

@ -49,6 +49,7 @@ end
require 'support/rails_app'
require 'support/rails_7_patch'
require 'support/ruby_2_6_rails_4_2_patch'
# require "rails/test_help"