Fix Ruby 2.7 warnings in RSpec matcher proxies

This commit is contained in:
Thomas Walpole 2020-02-19 18:45:43 -08:00
parent 61da95084c
commit b5341f606c
1 changed files with 4 additions and 4 deletions

View File

@ -2,17 +2,17 @@
module Capybara
module RSpecMatcherProxies
def all(*args, &block)
def all(*args, **kwargs, &block)
if defined?(::RSpec::Matchers::BuiltIn::All) && args.first.respond_to?(:matches?)
::RSpec::Matchers::BuiltIn::All.new(*args)
else
find_all(*args, &block)
find_all(*args, **kwargs, &block)
end
end
def within(*args, &block)
def within(*args, **kwargs, &block)
if block_given?
within_element(*args, &block)
within_element(*args, **kwargs, &block)
else
be_within(*args)
end