Skip to content

Commit a55a786

Browse files
committed
TextBlock#merge adds num_words
1 parent eeed5e1 commit a55a786

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/document/text_block_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ module Boilerpipe
5050
subject.merge_next(another_block)
5151
expect(subject.text).to eq "hello\ngood-bye"
5252
end
53+
54+
it 'num words gets combined' do
55+
another_block = Document::TextBlock.new('good-bye', 1)
56+
subject.merge_next(another_block)
57+
expect(subject.num_words).to eq 1
58+
end
5359
end
5460

5561
describe '#add_label' do

0 commit comments

Comments
 (0)