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:
parent
f7ab0b5cd5
commit
b0b2c6d7c9
4 changed files with 2 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -192,7 +192,7 @@ module Capybara
|
|||
end
|
||||
|
||||
def ==(other)
|
||||
native == other.native
|
||||
eql?(other) || (other.respond_to?(:native) && native == other.native)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -146,10 +146,6 @@ class Capybara::RackTest::Node < Capybara::Driver::Node
|
|||
end
|
||||
end
|
||||
|
||||
def ==(other)
|
||||
native == other.native
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
# @api private
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue