Skip to content

Commit

Permalink
Move spec to existing 'for method calls' context
Browse files Browse the repository at this point in the history
  • Loading branch information
bquorning committed Jan 27, 2019
1 parent a41aeb6 commit 80f2fb6
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions spec/rubocop/cop/layout/closing_parenthesis_indentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,27 @@
RUBY
end
end

context 'with first multiline arg on new line' do
it 'accepts ) on the same level as ( with args on same line' do
expect_no_offenses(<<-RUBY.strip_indent)
where(
"multiline
condition", second_arg
)
RUBY
end

it 'accepts ) on the same level as ( with second arg on new line' do
expect_no_offenses(<<-RUBY.strip_indent)
where(
"multiline
condition",
second_arg
)
RUBY
end
end
end

context 'for method assignments with indented parameters' do
Expand Down Expand Up @@ -500,27 +521,6 @@ def some_method()
end
end

context 'method call with first multiline arg on new line' do
it 'accepts ) on the same level as ( with args on same line' do
expect_no_offenses(<<-RUBY.strip_indent)
where(
"multiline
condition", second_arg
)
RUBY
end

it 'accepts ) on the same level as ( with second arg on new line' do
expect_no_offenses(<<-RUBY.strip_indent)
where(
"multiline
condition",
second_arg
)
RUBY
end
end

it 'accepts begin nodes that are not grouped expressions' do
expect_no_offenses(<<-RUBY.strip_indent)
def a
Expand Down

0 comments on commit 80f2fb6

Please sign in to comment.