Skip to content

Commit

Permalink
Fix webrat warnings
Browse files Browse the repository at this point in the history
Forwarding methods to private methods is deprecated and produces a
warning after Ruby 2.4.

see: https://bugs.ruby-lang.org/issues/12782

To fix this issue I'm mocking patching webrat making RailsAdatper#response
method public since Webrat::Session is delegating functions to it.
  • Loading branch information
feliperenan committed Feb 4, 2019
1 parent 6064ca8 commit 101e50f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/support/webrat/integrations/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ def logger # :nodoc:
end

class RailsAdapter
# This method is private within webrat gem and after Ruby 2.4 we get a lot of warnings because
# Webrat::Session#response is delegated to this method.
def response
integration_session.response
end

protected

def do_request(http_method, url, data, headers)
Expand Down

0 comments on commit 101e50f

Please sign in to comment.