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

test/rubocops: improve test descriptions #10124

Merged
merged 1 commit into from
Dec 25, 2020

Conversation

SeekingMeaning
Copy link
Contributor

@SeekingMeaning SeekingMeaning commented Dec 24, 2020

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • [?] Have you written new tests for your changes? [That's an interesting idea—writing tests for our tests]
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?
  • Have you successfully run brew man locally and committed any changes?

While reviewing #10118, I noticed that a lot of context and it descriptions in test/rubocops are somewhat incoherent

For example:

  context "uses_from_macos" do
    it "wrong conditional uses_from_macos order" do
Failures:

  1) RuboCop::Cop::FormulaAudit::DependencyOrder uses_from_macos wrong conditional uses_from_macos order

This PR improves the test descriptions for the following specs:

  • test/rubocops/caveats_spec.rb
  • test/rubocops/checksum_spec.rb
  • test/rubocops/components_redundancy_spec.rb
  • test/rubocops/conflicts_spec.rb
  • test/rubocops/dependency_order_spec.rb
  • test/rubocops/deprecate_disable_spec.rb

Now the previous example looks like this:

  context "when auditing `uses_from_macos`" do
    it "reports an offense if wrong conditional order" do
Failures:

  1) RuboCop::Cop::FormulaAudit::DependencyOrder when auditing `uses_from_macos` reports an offense if wrong conditional order

@BrewTestBot
Copy link
Member

Review period will end on 2020-12-25 at 02:16:18 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Dec 24, 2020
@MikeMcQuaid
Copy link
Member

Thanks @SeekingMeaning!

Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks! A few suggestions

Library/Homebrew/test/rubocops/checksum_spec.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/rubocops/deprecate_disable_spec.rb Outdated Show resolved Hide resolved
@BrewTestBot
Copy link
Member

Review period ended.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Dec 25, 2020
@SeekingMeaning SeekingMeaning merged commit 96c28d2 into Homebrew:master Dec 25, 2020
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 25, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants