From a070dfa0c5b64084108977176b914ffb32ceac5f Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sat, 25 Feb 2017 13:08:26 +0900 Subject: Only load SystemTestCase if Puma is defined SystemTestCase supports only Puma, and always load puma's file. https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/system_testing/server.rb#L1 For that reason, the case of use Capybara but do not use Puma, it will cause an error. So we need to check about Puma is defined as well. --- railties/lib/rails/test_help.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index 09931c108a..8e290239bd 100644 --- a/railties/lib/rails/test_help.rb +++ b/railties/lib/rails/test_help.rb @@ -11,7 +11,7 @@ require "rails/generators/test_case" require "active_support/testing/autorun" -if defined?(Capbyara) +if defined?(Capybara) && defined?(Puma) require "action_dispatch/system_test_case" end @@ -49,7 +49,7 @@ class ActionDispatch::IntegrationTest end end -if defined? Capybara +if defined?(Capybara) && defined?(Puma) class ActionDispatch::SystemTestCase def before_setup # :nodoc: @routes = Rails.application.routes -- cgit v1.2.3