diff --git a/lib/rspec/rails/example/system_example_group.rb b/lib/rspec/rails/example/system_example_group.rb index 9ea1c25e93..691b1f0c28 100644 --- a/lib/rspec/rails/example/system_example_group.rb +++ b/lib/rspec/rails/example/system_example_group.rb @@ -81,7 +81,7 @@ def app attr_reader :driver - if ::Rails.version.to_f == 5.1 + if ActionDispatch::SystemTesting::Server.respond_to?(:silence_puma=) ActionDispatch::SystemTesting::Server.silence_puma = true end