diff --git a/capybara.md b/capybara.md index 8dd49736c..04b0737b3 100644 --- a/capybara.md +++ b/capybara.md @@ -122,11 +122,11 @@ In RSpec, you can use `page.should` assertions. expect(page).to have_no_button('Save') # OK ``` ```ruby -expect(page).not_to have_button('Save') # Bad +expect(page).not_to have_button('Save') # OK +``` +```ruby +!expect(page).to have_button('Save') # Bad ``` - -Use `should have_no_*` versions with RSpec matchers because -`should_not have_*` doesn't wait for a timeout from the driver. ## RSpec