Skip to content

Commit f35b3a6

Browse files
javierjulioJonRowe
authored andcommitted
Account for Rails config default switch
From: https://github.com/rspec/rspec-rails/pull/2712/files#r1425001008
1 parent b430027 commit f35b3a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/rspec/rails/example/rails_example_group.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ module RailsExampleGroup
1919
include ActiveSupport::ExecutionContext::TestHelper
2020
included do |_other|
2121
around do |example|
22-
::Rails.application.executor.perform { example.call }
22+
if ::Rails.configuration.active_support.executor_around_test_case
23+
::Rails.application.executor.perform { example.call }
24+
else
25+
example.call
26+
end
2327
end
2428
end
2529
end

0 commit comments

Comments
 (0)