Skip to content

Commit

Permalink
Suppress RuboCop's offense
Browse files Browse the repository at this point in the history
Follow up to rubocop/rubocop#9910.

This PR suppresses and corrects the following RuboCop's offense.

```console
% bundle exec rubocop -a
Inspecting 70 files
..................................................C...................

Offenses:

spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1125:13:
C: [Corrected] Layout/SpaceAroundOperators: Surrounding space missing for operator <<.
class <<@conn
      ^^
spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1131:13:
C: [Corrected] Layout/SpaceAroundOperators: Surrounding space missing for operator <<.
class <<@conn
      ^^

70 files inspected, 2 offenses detected, 2 offenses corrected
```
  • Loading branch information
koic committed Jul 8, 2021
1 parent b13ae02 commit e6d5af2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1122,13 +1122,13 @@ class ::TestEmployee < ActiveRecord::Base; end

before(:each) do
@conn.instance_variable_set :@would_execute_sql, @would_execute_sql = +""
class <<@conn
class << @conn
def execute(sql, name = nil); @would_execute_sql << sql << ";\n"; end
end
end

after(:each) do
class <<@conn
class << @conn
remove_method :execute
end
@conn.instance_eval { remove_instance_variable :@would_execute_sql }
Expand Down

0 comments on commit e6d5af2

Please sign in to comment.