diff --git a/capybara.md b/capybara.md index 04b0737b38..49cc8cd0f5 100644 --- a/capybara.md +++ b/capybara.md @@ -119,15 +119,15 @@ In RSpec, you can use `page.should` assertions. ### About negatives ```ruby -expect(page).to have_no_button('Save') # OK -``` -```ruby -expect(page).not_to have_button('Save') # OK +expect(page).to have_no_button('Save') ``` + ```ruby -!expect(page).to have_button('Save') # Bad +expect(page).not_to have_button('Save') ``` +The two above statements are functionally equivalent. + ## RSpec ### Matchers