Skip to content

Commit

Permalink
Add Rubocop extensions
Browse files Browse the repository at this point in the history
...and make a small rspec-performance related fix.

Added the extensions:
* rubocop-performance
* rubocop-rake
  • Loading branch information
acant committed Jan 9, 2025
1 parent 6d769ef commit 0f7ccd7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
require: rubocop-rspec
require:
- rubocop-performance
- rubocop-rake
- rubocop-rspec

AllCops:
NewCops: enable
Expand Down
2 changes: 2 additions & 0 deletions rspec-side_effects.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'bundler-audit'
spec.add_development_dependency 'license_finder'
spec.add_development_dependency 'rubocop'
spec.add_development_dependency 'rubocop-performance'
spec.add_development_dependency 'rubocop-rake'
spec.add_development_dependency 'rubocop-rspec'
spec.add_development_dependency 'simplecov'
spec.add_development_dependency 'simplecov-lcov'
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/side_effects_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_exception

# @param [#to_s] variable_name
def expect_instance_variable(variable_name)
expect(test_class.instance_variable_get("@#{variable_name}"))
expect(test_class.instance_variable_get(:"@#{variable_name}"))
end

describe '#its_side_effects_are' do
Expand Down

0 comments on commit 0f7ccd7

Please sign in to comment.