Skip to content

Commit

Permalink
Remove statement about should_not have vs should have_no
Browse files Browse the repository at this point in the history
This statement may have been true in the past, but now
the two statements are functionally equivalent.
  • Loading branch information
Adam McCrea committed Sep 3, 2011
1 parent 934a959 commit e608340
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions README.rdoc
Expand Up @@ -495,17 +495,6 @@ is (the default is 2 seconds):

Capybara.default_wait_time = 5

Be aware that because of this behaviour, the following two statements are *not*
equivalent, and you should *always* use the latter!

page.should_not have_xpath('a')
page.should have_no_xpath('a')

The former would incorrectly wait for the content to appear, since the
asynchronous process has not yet removed the element from the page, it would
therefore fail, even though the code might be working correctly. The latter
correctly waits for the element to disappear from the page.

Capybara's waiting behaviour is quite advanced, and can deal with situations
such as the following line of code:

Expand Down

0 comments on commit e608340

Please sign in to comment.