Skip to content

Commit

Permalink
Fix RSpec/AnyInstance
Browse files Browse the repository at this point in the history
Regenerate Rubocop's todo
  • Loading branch information
ericproulx committed Jul 23, 2024
1 parent 96f94f9 commit 3c9522e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 3 additions & 11 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-06-22 17:26:10 UTC using RuboCop version 1.64.1.
# on 2024-07-23 11:24:53 UTC using RuboCop version 1.64.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -37,12 +37,6 @@ Naming/VariableNumber:
- 'spec/grape/exceptions/validation_errors_spec.rb'
- 'spec/grape/validations_spec.rb'

# Offense count: 2
RSpec/AnyInstance:
Exclude:
- 'spec/grape/api_spec.rb'
- 'spec/grape/middleware/base_spec.rb'

# Offense count: 1
# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
Expand Down Expand Up @@ -140,15 +134,14 @@ RSpec/RepeatedExampleGroupDescription:
- 'spec/grape/util/inheritable_setting_spec.rb'
- 'spec/grape/validations/validators/values_spec.rb'

# Offense count: 5
# Offense count: 4
RSpec/StubbedMock:
Exclude:
- 'spec/grape/dsl/inside_route_spec.rb'
- 'spec/grape/dsl/routing_spec.rb'
- 'spec/grape/middleware/formatter_spec.rb'
- 'spec/grape/parser_spec.rb'

# Offense count: 122
# Offense count: 121
RSpec/SubjectStub:
Exclude:
- 'spec/grape/api_spec.rb'
Expand All @@ -164,7 +157,6 @@ RSpec/SubjectStub:
- 'spec/grape/middleware/formatter_spec.rb'
- 'spec/grape/middleware/globals_spec.rb'
- 'spec/grape/middleware/stack_spec.rb'
- 'spec/grape/parser_spec.rb'

# Offense count: 23
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
Expand Down
2 changes: 1 addition & 1 deletion spec/grape/middleware/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
context 'with patched warnings' do
before do
@warnings = warnings = []
allow_any_instance_of(described_class).to receive(:warn) { |m| warnings << m }
allow(subject).to receive(:warn) { |m| warnings << m }
allow(subject).to receive(:after).and_raise(StandardError)
end

Expand Down

0 comments on commit 3c9522e

Please sign in to comment.