Fix can't modify frozen String errors
Use unary plus as recommended by Performance/UnfreezeString cop
This commit is contained in:
parent
73e848850c
commit
8be61f7695
|
@ -93,7 +93,7 @@ describe 'Dashboard Issues Calendar Feed' do
|
||||||
|
|
||||||
expect(body).to have_text("SUMMARY:test title (in #{project.full_path})")
|
expect(body).to have_text("SUMMARY:test title (in #{project.full_path})")
|
||||||
# line length for ics is 75 chars
|
# line length for ics is 75 chars
|
||||||
expected_description = "DESCRIPTION:Find out more at #{issue_url(issue)}".insert(75, ' ')
|
expected_description = (+"DESCRIPTION:Find out more at #{issue_url(issue)}").insert(75, ' ')
|
||||||
expect(body).to have_text(expected_description)
|
expect(body).to have_text(expected_description)
|
||||||
expect(body).to have_text("DTSTART;VALUE=DATE:#{Date.tomorrow.strftime('%Y%m%d')}")
|
expect(body).to have_text("DTSTART;VALUE=DATE:#{Date.tomorrow.strftime('%Y%m%d')}")
|
||||||
expect(body).to have_text("URL:#{issue_url(issue)}")
|
expect(body).to have_text("URL:#{issue_url(issue)}")
|
||||||
|
|
|
@ -68,7 +68,7 @@ describe 'Group Issues Calendar Feed' do
|
||||||
|
|
||||||
expect(body).to have_text("SUMMARY:test title (in #{project.full_path})")
|
expect(body).to have_text("SUMMARY:test title (in #{project.full_path})")
|
||||||
# line length for ics is 75 chars
|
# line length for ics is 75 chars
|
||||||
expected_description = "DESCRIPTION:Find out more at #{issue_url(issue)}".insert(75, ' ')
|
expected_description = (+"DESCRIPTION:Find out more at #{issue_url(issue)}").insert(75, ' ')
|
||||||
expect(body).to have_text(expected_description)
|
expect(body).to have_text(expected_description)
|
||||||
expect(body).to have_text("DTSTART;VALUE=DATE:#{Date.tomorrow.strftime('%Y%m%d')}")
|
expect(body).to have_text("DTSTART;VALUE=DATE:#{Date.tomorrow.strftime('%Y%m%d')}")
|
||||||
expect(body).to have_text("URL:#{issue_url(issue)}")
|
expect(body).to have_text("URL:#{issue_url(issue)}")
|
||||||
|
|
|
@ -67,7 +67,7 @@ describe 'Project Issues Calendar Feed' do
|
||||||
|
|
||||||
expect(body).to have_text("SUMMARY:test title (in #{project.full_path})")
|
expect(body).to have_text("SUMMARY:test title (in #{project.full_path})")
|
||||||
# line length for ics is 75 chars
|
# line length for ics is 75 chars
|
||||||
expected_description = "DESCRIPTION:Find out more at #{issue_url(issue)}".insert(75, ' ')
|
expected_description = (+"DESCRIPTION:Find out more at #{issue_url(issue)}").insert(75, ' ')
|
||||||
expect(body).to have_text(expected_description)
|
expect(body).to have_text(expected_description)
|
||||||
expect(body).to have_text("DTSTART;VALUE=DATE:#{Date.tomorrow.strftime('%Y%m%d')}")
|
expect(body).to have_text("DTSTART;VALUE=DATE:#{Date.tomorrow.strftime('%Y%m%d')}")
|
||||||
expect(body).to have_text("URL:#{issue_url(issue)}")
|
expect(body).to have_text("URL:#{issue_url(issue)}")
|
||||||
|
|
|
@ -131,7 +131,7 @@ describe 'User views a wiki page' do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when page has invalid content encoding' do
|
context 'when page has invalid content encoding' do
|
||||||
let(:content) { 'whatever'.force_encoding('ISO-8859-1') }
|
let(:content) { (+'whatever').force_encoding('ISO-8859-1') }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
allow(Gitlab::EncodingHelper).to receive(:encode!).and_return(content)
|
allow(Gitlab::EncodingHelper).to receive(:encode!).and_return(content)
|
||||||
|
|
Loading…
Reference in New Issue