Skip to content

Commit b708a1b

Browse files
committed
Address Layout/IndentationWidth cop offenses
This commit addresses RuboCop offenses reported at https://buildkite.com/rails/rails/builds/107320#018f8835-b770-4068-9b97-0aec28c7ddb3 - Offenses are addressed by RuboCop auto correction as follows ``` $ bundle exec rubocop -a activerecord/test/cases/connection_adapters/type_lookup_test.rb Inspecting 1 file C Offenses: activerecord/test/cases/connection_adapters/type_lookup_test.rb:91:9: C: [Corrected] Layout/IndentationWidth: Use 2 (not 3) spaces for indentation. %w{decimal(2) decimal(2,0) numeric(2) numeric(2,0) number(2) number(2,0)}.each do |type| ^^^ activerecord/test/cases/connection_adapters/type_lookup_test.rb:92:11: C: [Corrected] Layout/IndentationWidth: Use 2 (not 3) spaces for indentation. cast_type = @connection.send(:type_map).lookup(type) ^^^ activerecord/test/cases/connection_adapters/type_lookup_test.rb:94:14: C: [Corrected] Layout/IndentationConsistency: Inconsistent indentation detected. assert_equal :decimal, cast_type.type ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ activerecord/test/cases/connection_adapters/type_lookup_test.rb:95:14: C: [Corrected] Layout/IndentationConsistency: Inconsistent indentation detected. assert_equal 2, cast_type.cast(2.1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 file inspected, 4 offenses detected, 4 offenses corrected $ ``` Follow up rails#51826
1 parent d0ce794 commit b708a1b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

activerecord/test/cases/connection_adapters/type_lookup_test.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ def test_bigint_limit
8888
end
8989

9090
def test_decimal_without_scale
91-
%w{decimal(2) decimal(2,0) numeric(2) numeric(2,0) number(2) number(2,0)}.each do |type|
92-
cast_type = @connection.send(:type_map).lookup(type)
91+
%w{decimal(2) decimal(2,0) numeric(2) numeric(2,0) number(2) number(2,0)}.each do |type|
92+
cast_type = @connection.send(:type_map).lookup(type)
9393

94-
assert_equal :decimal, cast_type.type
95-
assert_equal 2, cast_type.cast(2.1)
96-
end
94+
assert_equal :decimal, cast_type.type
95+
assert_equal 2, cast_type.cast(2.1)
96+
end
9797
end
9898

9999
private

0 commit comments

Comments
 (0)