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 bad negative example from capybara sheet #1798

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

getschomp
Copy link
Contributor

@getschomp getschomp commented Mar 7, 2022

Removes the bad negative example and adds a new one that still has bad performance.

It use to be that not_to would wait
in a non-performant way:
https://www.cloudbees.com/blog/faster-rails-tests

but now it it no longer waits:
rubocop/rubocop-rspec#378 (comment)

Removes the bad negative example and adds a new one
that still has bad performance. It use to be that `not_to` would wait
in a non-performant way:
https://www.cloudbees.com/blog/faster-rails-tests 
but now it it no longer waits: 
rubocop/rubocop-rspec#378 (comment)
@getschomp
Copy link
Contributor Author

@rstacruz, WDYT?

@rstacruz rstacruz merged commit db559f8 into rstacruz:master Mar 14, 2023
@rstacruz
Copy link
Owner

Thanks for this! Sorry it took a while

ydah added a commit to ydah/cheatsheets that referenced this pull request Mar 20, 2024
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 pushed a commit that referenced this pull request Mar 21, 2024
)

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:

```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.
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