Permalink
Browse files

Renaming method prefix -> root_path

  • Loading branch information...
1 parent b48c529 commit 3ef5da87fa13d9bc2d995c8ba94a40ca88a92616 @andyw8 committed Apr 23, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/capybara-page-object/page.rb
@@ -8,12 +8,12 @@ def path(*args)
raise MissingPath, "You need to override #path in #{self.class}"
end
- def prefix
+ def root_path
'/'
end
def visit_path(attr)
- target = prefix + path
+ target = root_path + path
if attr.kind_of?(String)
target += '/' + attr
elsif attr.kind_of?(Integer)
@@ -35,7 +35,7 @@ def from_string(string, target)
def current?
page = new
- page.source.current_path == page.prefix + page.path
+ page.source.current_path == page.root_path + page.path
end
def visit(attr=nil)

0 comments on commit 3ef5da8

Please sign in to comment.