1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Move Node#== to base class

This commit is contained in:
Thomas Walpole 2021-05-16 11:24:36 -07:00
parent f7ab0b5cd5
commit b0b2c6d7c9
4 changed files with 2 additions and 10 deletions

View file

@ -132,7 +132,7 @@ module Capybara
end
def ==(other)
raise NotSupportedByDriverError, 'Capybara::Driver::Node#=='
eql?(other) || (other.respond_to?(:native) && native == other.native)
end
end
end

View file

@ -192,7 +192,7 @@ module Capybara
end
def ==(other)
native == other.native
eql?(other) || (other.respond_to?(:native) && native == other.native)
end
private

View file

@ -146,10 +146,6 @@ class Capybara::RackTest::Node < Capybara::Driver::Node
end
end
def ==(other)
native == other.native
end
protected
# @api private

View file

@ -199,10 +199,6 @@ class Capybara::Selenium::Node < Capybara::Driver::Node
native.attribute('isContentEditable') == 'true'
end
def ==(other)
native == other.native
end
def path
driver.evaluate_script GET_XPATH_SCRIPT, self
end