diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/blob_helper_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb index b8bba36439a..74edef3a2b4 100644 --- a/spec/helpers/blob_helper_spec.rb +++ b/spec/helpers/blob_helper_spec.rb @@ -64,4 +64,15 @@ describe BlobHelper do end end end + + describe 'highlight_line' do + let(:expected) do + %q(<span id="LC1" class="line"><span class="nb">puts</span> <span class="s1">'Hello'</span> <span class="idiff">world</span></span>) + end + + it 'should respect the inline diff markup' do + result = highlight_line('demo.rb', "puts 'Hello' <span class='idiff'>world</span>") + expect(result).to eq(expected) + end + end end |