diff options
Diffstat (limited to 'spec/hunk_spec.rb')
-rw-r--r-- | spec/hunk_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/hunk_spec.rb b/spec/hunk_spec.rb index 0741b87..282946b 100644 --- a/spec/hunk_spec.rb +++ b/spec/hunk_spec.rb @@ -59,5 +59,19 @@ Tu avec carte {count} item has EOD expect(hunk.diff(:reverse_ed).to_s == expected).to eql true end + + context 'with empty first data set' do + let(:old_data) { [] } + + it 'should be able to produce a unified diff' do + expected = +(<<-EOD.encode('UTF-16LE').chomp) +@@ -1 +1,2 @@ ++Tu avec carte {count} item has +EOD + expect(hunk.diff(:unified).to_s == expected).to eql true + end + end + end end |