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

Enable RSpec/DescribeClass #9730

Merged
merged 3 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ RSpec/ContainExactly:
RSpec/ContextWording:
Enabled: false

# Offense count: 2
# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
Exclude:
- 'elm/spec/dependabot/elm/update_checker/requirements_updater_spec.rb'
- 'npm_and_yarn/spec/npm_and_yarn_config_spec.rb'

# Offense count: 31
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
require "spec_helper"
require "dependabot/elm/update_checker/requirements_updater"

the_class = Dependabot::Elm::UpdateChecker::RequirementsUpdater
RSpec.describe the_class do
RSpec.describe Dependabot::Elm::UpdateChecker::RequirementsUpdater do
let(:updater) do
described_class.new(
requirements: requirements,
Expand Down
4 changes: 4 additions & 0 deletions npm_and_yarn/spec/npm_and_yarn_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

require "spec_helper"

# NOTE: This test does not have a corresponding class. It is testing the npm and yarn configuration.
# rubocop:disable RSpec/DescribeClass
RSpec.describe "npm and yarn config" do
# rubocop:enable RSpec/DescribeClass
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# rubocop:disable RSpec/DescribeClass
RSpec.describe "npm and yarn config" do
# rubocop:enable RSpec/DescribeClass
RSpec.describe "npm and yarn config" do # rubocop:disable RSpec/DescribeClass

Feel entirely free to ignore this, but I always find this a bit more ergonomic to write, I don't think it's well documented that this is possible, but it disables the rule for the block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is so much better, thanks


# NOTE: This comes from updater/config/.npmrc
it "contains a valid .npmrc config file" do
npm_result = `npm config list`
Expand Down
Loading