Skip to content

Commit e218830

Browse files
committed
spec for merge - use the later end block
1 parent acc4ef3 commit e218830

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spec/document/text_block_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ module Boilerpipe
8282
block.merge_next(another_block)
8383
expect(block.offset_blocks_start).to eq 3
8484
end
85+
86+
it 'offset_block_end uses the later end' do
87+
block = Document::TextBlock.new('one', 1, 1, 1, 1, 5)
88+
another_block = Document::TextBlock.new('two', 1, 1, 1, 1, 3)
89+
block.merge_next(another_block)
90+
expect(block.offset_blocks_end).to eq 5
91+
end
8592
end
8693

8794
describe '#add_label' do

0 commit comments

Comments
 (0)