1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Remove statement about should_not have vs should have_no

This statement may have been true in the past, but now
the two statements are functionally equivalent.
This commit is contained in:
Adam McCrea 2011-08-21 23:38:08 -04:00
parent 934a959a4b
commit e608340b6e

View file

@ -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: