Skip to content

Commit 1c72411

Browse files
committed
spec for num_wrapped lines
1 parent 5a382e3 commit 1c72411

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spec/document/text_block_spec.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,19 @@ module Boilerpipe
6262
subject.merge_next(another_block)
6363
expect(subject.num_words_in_anchor_text).to eq 1
6464
end
65+
66+
it 'num_words_in_wrapped_lines gets combined' do
67+
another_block = Document::TextBlock.new('good-bye', 1, 1, 1)
68+
subject.merge_next(another_block)
69+
expect(subject.num_words_in_wrapped_lines).to eq 1
70+
end
71+
72+
it 'num_wrapped_lines gets combined' do
73+
# one by default
74+
another_block = Document::TextBlock.new('good-bye', 1, 1, 1)
75+
subject.merge_next(another_block)
76+
expect(subject.num_wrapped_lines).to eq 2
77+
end
6578
end
6679

6780
describe '#add_label' do

0 commit comments

Comments
 (0)