Skip to content

Commit

Permalink
Set RSpec/DescribedClass cop to explicit
Browse files Browse the repository at this point in the history
Additionally:
- Autofix offenses
- Update RuboCop dependencies and set require to false
- Regenerate rubocop_todo.yml

Ref: #177 (comment)
  • Loading branch information
tagliala committed Dec 15, 2024
1 parent daee59f commit c2519ab
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 24 deletions.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ AllCops:
# https://github.com/jamesmartin/inline_svg/pull/171/files#r1798763446
Style/EachWithObject:
Enabled: false

# https://github.com/jamesmartin/inline_svg/pull/177#issuecomment-2530239552
RSpec/DescribedClass:
EnforcedStyle: explicit
18 changes: 2 additions & 16 deletions .rubocop_todo.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ gem "pry"
gem "rake"
gem "rspec"

gem "rubocop", "1.66.1"
gem "rubocop-packaging", "0.5.2"
gem "rubocop-performance", "1.22.1"
gem "rubocop-rake", "0.6.0"
gem "rubocop-rspec", "3.0.5"
gem "rubocop", "1.69.2", require: false
gem "rubocop-packaging", "0.5.2", require: false
gem "rubocop-performance", "1.23.0", require: false
gem "rubocop-rake", "0.6.0", require: false
gem "rubocop-rspec", "3.3.0", require: false
4 changes: 2 additions & 2 deletions spec/static_asset_finder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
stub_const('Rails', double('Rails').as_null_object)
expect(Rails.application.config.assets).to receive(:compile).and_return(true)

expect(described_class.find_asset('some-file').pathname).to be_nil
expect(InlineSvg::StaticAssetFinder.find_asset('some-file').pathname).to be_nil
end
end

Expand All @@ -21,7 +21,7 @@
expect(asset).to receive(:filename).and_return(pathname)
expect(Rails.application.assets).to receive(:[]).with('some-file').and_return(asset)

expect(described_class.find_asset('some-file').pathname).to eq(pathname)
expect(InlineSvg::StaticAssetFinder.find_asset('some-file').pathname).to eq(pathname)
end
end
end
2 changes: 1 addition & 1 deletion spec/webpack_asset_finder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
stub_const('Shakapacker', double('Shakapacker').as_null_object)
expect(Shakapacker.manifest).to receive(:lookup).with('some-file').and_return(nil)

expect(described_class.find_asset('some-file').pathname).to be_nil
expect(InlineSvg::WebpackAssetFinder.find_asset('some-file').pathname).to be_nil
end
end
end

0 comments on commit c2519ab

Please sign in to comment.