Skip to content

Commit

Permalink
renamed matcher to xpath_for
Browse files Browse the repository at this point in the history
  • Loading branch information
despo committed Feb 10, 2012
1 parent 7237d7e commit 4ce81e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/prickle/capybara.rb
Expand Up @@ -27,7 +27,7 @@ def element type='*', identifier

private

def matcher identifier
def xpath_for identifier
return identifier.each_pair.to_a.map do |key, value|
"@#{key}='#{value}'"
end.join ' and '
Expand Down
2 changes: 1 addition & 1 deletion lib/prickle/capybara/find.rb
Expand Up @@ -21,7 +21,7 @@ def method_missing method, *args
end

def find_by_identifier_xpath element, identifier
"//#{type_of(element)}[#{matcher(identifier)}]"
"//#{type_of(element)}[#{xpath_for(identifier)}]"
end

def find_element_by_identifier element, identifier
Expand Down
2 changes: 1 addition & 1 deletion lib/prickle/capybara/match.rb
Expand Up @@ -19,7 +19,7 @@ def method_missing method, *args
private

def find_by_name_and_text_xpath element, identifier, text
"//#{type_of(element)}[#{matcher(identifier)} and contains(text(), '#{text}')]"
"//#{type_of(element)}[#{xpath_for(identifier)} and contains(text(), '#{text}')]"
end

def find_element_by_name_and_text element, name, text
Expand Down

0 comments on commit 4ce81e4

Please sign in to comment.