+<span id="LC9" class="line"> <span class="k">raise</span> <span class="no">RuntimeError</span><span class="p">,</span> <span class="s2">"System commands must be given as an array of strings"</span></span>
+<span id="LC9" class="line"> <span class="k">raise</span> <span class="no"><span class='idiff'>RuntimeError</span></span><span class="p"><span class='idiff'>,</span></span> <span class="s2">"System commands must be given as an array of strings"</span></span>
@@ -37,30 +26,16 @@ describe Gitlab::Diff::Highlight, lib: true do
...
@@ -37,30 +26,16 @@ describe Gitlab::Diff::Highlight, lib: true do
expect(diff_lines[2].text).toeq(code)
expect(diff_lines[2].text).toeq(code)
end
end
it'should highlight added lines'do
code=%Q{+<span id="LC9" class="line"> <span class="k">raise</span> <span class="no">RuntimeError</span><span class="p">,</span> <span class="s2">"System commands must be given as an array of strings"</span></span>\n}
expect(diff_lines[5].text).toeq(code)
end
it'should highlight removed lines'do
it'should highlight removed lines'do
code=%Q{-<span id="LC9" class="line"> <span class="k">raise</span> <span class="s2">"System commands must be given as an array of strings"</span></span>\n}
code=%Q{-<span id="LC9" class="line"> <span class="k">raise</span> <span class="s2">"System commands must be given as an array of strings"</span></span>\n}
expect(diff_lines[4].text).toeq(code)
expect(diff_lines[4].text).toeq(code)
end
end
end
end
describe'.highlight_lines'do
it'should highlight added lines'do
let(:lines)do
code=%Q{+<span id="LC9" class="line"> <span class="k">raise</span> <span class="no"><span class='idiff'>RuntimeError</span></span><span class="p"><span class='idiff'>,</span></span> <span class="s2">"System commands must be given as an array of strings"</span></span>\n}