Skip to content

Commit

Permalink
failure message now takes a second argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicklas committed Mar 10, 2011
1 parent 944e3d8 commit 3eaeccc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/capybara/spec/session/find_spec.rb
Expand Up @@ -83,7 +83,7 @@
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'
Expand Down

0 comments on commit 3eaeccc

Please sign in to comment.