Sha256: 0ad93542a28e96c4d6177e32a780ccc2c155ba5af55832cfa7e1563d95ce6013

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 Bytes

Contents

# Rails 5 deprecates calling HTTP action methods with positional arguments
# in favor of keyword arguments. However, the keyword argument form is only
# supported in Rails 5+. Since we support back to 4, we need some sort of shim
# to avoid super noisy deprecations when running tests.
module HTTPMethodShim
  def get(path, params = nil, headers = nil)
    super(path, params: params, headers: headers)
  end
end

if Rails::VERSION::MAJOR >= 5
  RSpec.configure do |config|
    config.include HTTPMethodShim, type: :controller
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
high_voltage-3.0.0 spec/support/http_method_shim.rb