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

Replace should-example with expect-example #899

Merged

Conversation

ngoral
Copy link
Contributor

@ngoral ngoral commented Apr 27, 2020

In the docs for RSpec/NamedSubject we use should-style example as a good one. Since expect-style is a modern and enforced one, I guess it would be more correct to use expect-style examples.


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Updated documentation.
  • Added an entry to the changelog if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

@ngoral ngoral force-pushed the replace_should_style_example_for_named_subject branch from f275bba to f97a88b Compare April 27, 2020 18:08
@pirj pirj mentioned this pull request Apr 27, 2020
3 tasks
Copy link
Member

@pirj pirj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's so hard to keep up to have canonical code even in the comments.

Build failure is unrelated and will be fixed in #901

Funny enough that is_expected that is better than should is used as a "bad" example.

Thanks for your contribution!

@pirj pirj requested a review from bquorning April 27, 2020 20:46
@pirj pirj force-pushed the replace_should_style_example_for_named_subject branch from f97a88b to ff6b291 Compare April 27, 2020 21:07
@pirj pirj merged commit b5c18e1 into rubocop:master Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants