Skip to content

Commit

Permalink
Consistent multi-line string concatenation
Browse files Browse the repository at this point in the history
I have suggested some rules for consistent formatting of these strings
in rubocop/rubocop#6420, but it seems to be
too complicated to have RuboCop enforce them.
  • Loading branch information
bquorning committed Nov 14, 2020
1 parent 411b421 commit 2ea3fd7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions spec/rubocop/cop/capybara/current_path_expectation_spec.rb
Expand Up @@ -29,37 +29,37 @@

include_examples 'autocorrect',
'expect(current_path).to eq expected_path',
'expect(page).to have_current_path expected_path, '\
'expect(page).to have_current_path expected_path, ' \
'ignore_query: true'

include_examples 'autocorrect',
'expect(current_path).to eq(expected_path)',
'expect(page).to have_current_path(expected_path, '\
'expect(page).to have_current_path(expected_path, ' \
'ignore_query: true)'

include_examples 'autocorrect',
'expect(current_path).to(eq(expected_path))',
'expect(page).to(have_current_path(expected_path, '\
'expect(page).to(have_current_path(expected_path, ' \
'ignore_query: true))'

include_examples 'autocorrect',
'expect(current_path).to eq(expected_path(f: :b))',
'expect(page).to have_current_path(expected_path(f: :b), '\
'expect(page).to have_current_path(expected_path(f: :b), ' \
'ignore_query: true)'

include_examples 'autocorrect',
'expect(page.current_path).to eq(foo(bar).path)',
'expect(page).to have_current_path(foo(bar).path, '\
'expect(page).to have_current_path(foo(bar).path, ' \
'ignore_query: true)'

include_examples 'autocorrect',
'expect(current_path).not_to eq expected_path',
'expect(page).to have_no_current_path expected_path, '\
'expect(page).to have_no_current_path expected_path, ' \
'ignore_query: true'

include_examples 'autocorrect',
'expect(current_path).to_not eq expected_path',
'expect(page).to have_no_current_path expected_path, '\
'expect(page).to have_no_current_path expected_path, ' \
'ignore_query: true'

include_examples 'autocorrect',
Expand Down

0 comments on commit 2ea3fd7

Please sign in to comment.