Fix frozen string error

This commit is contained in:
Thong Kuah 2019-07-25 20:20:27 +12:00
parent f0391c2517
commit 595a092a08
2 changed files with 6 additions and 5 deletions

View File

@ -13,7 +13,7 @@ describe 'User browses commits' do
it 'renders commit' do
visit project_commit_path(project, sample_commit.id)
expect(page).to have_content(sample_commit.message.gsub!(/\s+/, ' '))
expect(page).to have_content(sample_commit.message.gsub(/\s+/, ' '))
.and have_content("Showing #{sample_commit.files_changed_count} changed files")
.and have_content('Side-by-side')
end

View File

@ -32,11 +32,12 @@ module ApiHelpers
end
if query_string
full_path << (path.index('?') ? '&' : '?')
full_path << query_string
end
separator = path.index('?') ? '&' : '?'
full_path
full_path + separator + query_string
else
full_path
end
end
def expect_paginated_array_response(items)