-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Enable RSpec/DescribeClass #17015
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
Enable RSpec/DescribeClass #17015
Conversation
@@ -1,25 +0,0 @@ | |||
# frozen_string_literal: true | |||
|
|||
RSpec.describe "conflicts_with", :cask do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seemed weird to have this in its own file – I moved this to dsl_spec
, where there are similar tests.
@@ -2,7 +2,9 @@ | |||
|
|||
# TODO: this test should be named after the corresponding class, once | |||
# that class is abstracted from installer.rb | |||
# rubocop:disable RSpec/DescribeClass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would resolve with the TODO above it.
@@ -229,15 +229,3 @@ def formula(name = "formula_name", path: Formulary.core_path(name), spec: :stabl | |||
end.to raise_error(BuildError) | |||
end | |||
end | |||
|
|||
__END__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks again @dduugg!
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Follow-up to https://github.com/Homebrew/brew/pull/16815/files#r1518269399
Disabling this cop made sense, when we would have had ~100 command spec files using
Homebrew
, but now they're each individually namespaced.There are still a few stray files that don't make sense to spec under a class. For the most part, I used the escape hatch of labeling them
type: system
. That's arguably too esoteric though, and perhaps I should justrubocop:disable
them instead (but i consider the latter to be a bit of an eyesore). Feedback welcome.