mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
![]() Follow https://github.com/teamcapybara/capybara/issues/2371. This PR adds `uplelvel` to deprecation warning of Capybara. The `uplevel` option has been introduced from Ruby 2.6. > If the `uplevel` keyword argument is given, the string will be prepended with information for the given caller frame in the same format used by the `rb_warn` C function. https://ruby-doc.org/core-2.6.0/Kernel.html#method-i-warn On the other hand, Capybara supports Ruby 2.5. Therefore, This PR adds `Capybara::Helpers.warn` internal method for emulating `warn 'message', uplevel: 1` in Ruby 2.5 or lower. This option will clarify where deprecation warnings should be fixed. ## Before ```console DEPRECATED: Calling 'has_key?' on the drivers/servers container is deprecated without replacement ``` ## After ```console /Users/koic/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/turnip-4.1.0/ lib/turnip/capybara.rb:10: warning: DEPRECATED: Calling 'has_key?' on the drivers/servers container is deprecated without replacement ``` |
||
---|---|---|
.. | ||
matchers | ||
features.rb | ||
matcher_proxies.rb | ||
matchers.rb |