Sha256: b43e2e64bbc126c85640d8e2355f7f7ed14f0213972c5a9e76c032d73d0e5945

Contents?: true

Size: 750 Bytes

Versions: 104

Compression:

Stored size: 750 Bytes

Contents

# frozen_string_literal: true

module ActionDispatch
  module SystemTesting
    module TestHelpers
      module UndefMethods # :nodoc:
        extend ActiveSupport::Concern
        included do
          METHODS = %i(get post put patch delete).freeze

          METHODS.each do |verb|
            undef_method verb
          end

          def method_missing(method, *args, &block)
            if METHODS.include?(method)
              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
          end
        end
      end
    end
  end
end

Version data entries

104 entries across 98 versions & 6 rubygems

Version Path
actionpack-5.2.8.1 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.8 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.7.1 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.7 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.6.3 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.6.2 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.6.1 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.6 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.4.6 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.5 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.4.5 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.4.4 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.4.3 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.4.2 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.4.1 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.4 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
actionpack-5.2.4.rc1 lib/action_dispatch/system_testing/test_helpers/undef_methods.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/system_testing/test_helpers/undef_methods.rb