Skip to content

Commit 94305a6

Browse files
committed
merges labels
1 parent 6be50e4 commit 94305a6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/document/text_block_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,18 @@ module Boilerpipe
121121

122122
expect(block.content).to eq true
123123
end
124+
125+
it 'merges labels' do
126+
block = Document::TextBlock.new('one')
127+
block.add_label('boom')
128+
129+
another_block = Document::TextBlock.new('two')
130+
another_block.add_label('pow')
131+
132+
block.merge_next(another_block)
133+
134+
expect(block.labels).to eq Set.new(['boom', 'pow'])
135+
end
124136
end
125137

126138
describe '#add_label' do

0 commit comments

Comments
 (0)