Skip to content

Commit eb96d5f

Browse files
authored
Merge pull request rails#43757 from ghiculescu/patch-7
Fix crash in `ActionController::TestCase` in rspec
2 parents 7795ded + 39cde50 commit eb96d5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

actionpack/lib/action_controller/test_case.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def load!
333333
#
334334
# assert_redirected_to page_url(title: 'foo')
335335
class TestCase < ActiveSupport::TestCase
336-
class_attribute :executor_around_each_request, default: false
336+
singleton_class.attr_accessor :executor_around_each_request
337337

338338
module Behavior
339339
extend ActiveSupport::Concern
@@ -581,7 +581,7 @@ def setup_request(controller_class_name, action, parameters, session, flash, xhr
581581
end
582582

583583
def wrap_execution(&block)
584-
if executor_around_each_request && defined?(Rails.application) && Rails.application
584+
if ActionController::TestCase.executor_around_each_request && defined?(Rails.application) && Rails.application
585585
Rails.application.executor.wrap(&block)
586586
else
587587
yield

0 commit comments

Comments
 (0)