mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
failure message now takes a second argument
This commit is contained in:
parent
944e3d8af7
commit
3eaeccca9f
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ shared_examples_for "find" do
|
|||
it "should raise an error with the failure message if the element is not found" do
|
||||
Capybara.add_selector(:monkey) do
|
||||
xpath { |num| ".//*[contains(@id, 'monkey')][#{num}]" }
|
||||
failure_message { |node| node.all(".//*[contains(@id, 'monkey')]").map { |node| node.text }.sort.join(', ') }
|
||||
failure_message { |node, selector| node.all(".//*[contains(@id, 'monkey')]").map { |node| node.text }.sort.join(', ') }
|
||||
end
|
||||
running do
|
||||
@session.find(:monkey, '14').text.should == 'Monkey Paul'
|
||||
|
|
Loading…
Reference in a new issue