diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb b/actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb index 2d3f4662d7..d64be3b3d9 100644 --- a/actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb +++ b/actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActionDispatch module SystemTesting module TestHelpers @@ -12,7 +14,7 @@ module ActionDispatch def method_missing(method, *args, &block) if METHODS.include?(method) - raise NoMethodError + raise NoMethodError, "System tests cannot make direct requests via ##{method}; use #visit and #click_on instead. See http://www.rubydoc.info/github/teamcapybara/capybara/master#The_DSL for more information." else super end |