Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a case that is not negative examples in the capybara sheet #2122

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

ydah
Copy link
Contributor

@ydah ydah commented Mar 20, 2024

!expect(page).to have_button('Save')

The above case is a new Bad case added by #1798 . It is designated as Bad due to performance issues, but it is not actually a Negative example. In practice, the following would be the same test:

expect(page).to have_button('Save')
!expect(page).to have_button('Save')

This is not an example that will appear on the capybara cheat sheet, because it is a problem with how RSpec is written. I think it should be removed because it creates confusion.

The above case is a new Bad case added by rstacruz#1798 . It is designated as Bad due to performance issues, but it is not actually a Negative example. In practice, the following would be the same test:

```ruby
expect(page).to have_button('Save')
!expect(page).to have_button('Save')
```

This is not an example that will appear on the capybara cheat sheet, because it is a problem with how RSpec is written. I think it should be removed because it creates confusion.
@rstacruz rstacruz merged commit dc91d7f into rstacruz:master Mar 21, 2024
4 checks passed
@rstacruz
Copy link
Owner

Good call, thanks for this!

@ydah ydah deleted the remove-badcase-in-capybara branch March 21, 2024 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants