Skip to content

Commit

Permalink
Merge pull request #232 from kimihito/suppress-deprecation-warning-in…
Browse files Browse the repository at this point in the history
…-capybara-3.33.0

Suppress deprecation warning in Capybara 3.33.0
  • Loading branch information
gongo authored Sep 2, 2020
2 parents 078ecd5 + 2973352 commit d4e589c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/turnip/capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
if self.class.include?(Capybara::DSL) and current_example.metadata[:turnip]
Capybara.current_driver = Capybara.javascript_driver if current_example.metadata.has_key?(:javascript)
current_example.metadata.each do |tag, value|
if Capybara.drivers.has_key?(tag)
has_driver = Capybara::VERSION >= '3.33.0' ? !Capybara.drivers[tag].nil? : Capybara.drivers.has_key?(tag)
if has_driver
Capybara.current_driver = tag
end
end
Expand Down

0 comments on commit d4e589c

Please sign in to comment.