mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Enable Layout/SpaceAfterSemicolon
cop to avoid newly adding odd spacing
Ref 59ff1ba30d (diff-38fb97fba84b1ef0f311c4110a597c44R35)
This commit is contained in:
parent
d0bb649cbf
commit
f907b418ae
3 changed files with 9 additions and 6 deletions
|
@ -99,6 +99,9 @@ Layout/SpaceAfterColon:
|
||||||
Layout/SpaceAfterComma:
|
Layout/SpaceAfterComma:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/SpaceAfterSemicolon:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Layout/SpaceAroundEqualsInParameterDefault:
|
Layout/SpaceAroundEqualsInParameterDefault:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
@ -109,10 +112,10 @@ Layout/SpaceAroundOperators:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Layout/SpaceBeforeComma:
|
Layout/SpaceBeforeComma:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Layout/SpaceBeforeFirstArg:
|
Layout/SpaceBeforeFirstArg:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Style/DefWithParentheses:
|
Style/DefWithParentheses:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
|
@ -374,7 +374,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_delete_association
|
def test_delete_association
|
||||||
assert_queries(2) { posts(:welcome);people(:michael); }
|
assert_queries(2) { posts(:welcome); people(:michael); }
|
||||||
|
|
||||||
assert_queries(1) do
|
assert_queries(1) do
|
||||||
posts(:welcome).people.delete(people(:michael))
|
posts(:welcome).people.delete(people(:michael))
|
||||||
|
@ -601,7 +601,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_replace_association
|
def test_replace_association
|
||||||
assert_queries(4) { posts(:welcome);people(:david);people(:michael); posts(:welcome).people.reload }
|
assert_queries(4) { posts(:welcome); people(:david); people(:michael); posts(:welcome).people.reload }
|
||||||
|
|
||||||
# 1 query to delete the existing reader (michael)
|
# 1 query to delete the existing reader (michael)
|
||||||
# 1 query to associate the new reader (david)
|
# 1 query to associate the new reader (david)
|
||||||
|
@ -740,7 +740,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_clear_associations
|
def test_clear_associations
|
||||||
assert_queries(2) { posts(:welcome);posts(:welcome).people.reload }
|
assert_queries(2) { posts(:welcome); posts(:welcome).people.reload }
|
||||||
|
|
||||||
assert_queries(1) do
|
assert_queries(1) do
|
||||||
posts(:welcome).people.clear
|
posts(:welcome).people.clear
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Deprecatee
|
||||||
deprecate :f=
|
deprecate :f=
|
||||||
|
|
||||||
deprecate :g
|
deprecate :g
|
||||||
def g ;end
|
def g; end
|
||||||
|
|
||||||
module B
|
module B
|
||||||
C = 1
|
C = 1
|
||||||
|
|
Loading…
Reference in a new issue