lib/mache/page.rb in mache-3.0.0 vs lib/mache/page.rb in mache-3.1.0
- old
+ new
@@ -30,12 +30,12 @@
# Returns a new page object.
#
# @param node [Capybara::Node] a Capybara node to attach to
# @param path [String] a path to where the page is located
def initialize(node: Capybara.current_session, path: nil)
- @node ||= node
- @path ||= path
+ @node = node
+ @path = path
end
# Visits the page at its {#path}.
#
# @return [Page] a page object
@@ -44,10 +44,10 @@
self
end
# Tests whether the page is current.
#
- # @return [Boolean] `true` if the page is current, `false` otherwise
+ # @return [Boolean] `true` if the page is current, `false` otherwise.
def current?
@node.current_path == path
end
# Creates a new page object and calls {#visit} on it.