Skip to content

Commit def509c

Browse files
committed
merge OR's content flag
1 parent 6abaf18 commit def509c

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
@@ -109,6 +109,18 @@ module Boilerpipe
109109
expect(block.num_words_in_wrapped_lines).to eq 20
110110
expect(block.num_wrapped_lines).to eq 2
111111
end
112+
113+
it 'if one is content the merged block is content' do
114+
block = Document::TextBlock.new('one')
115+
block.content = false
116+
117+
another_block = Document::TextBlock.new('two')
118+
another_block.content = true
119+
120+
block.merge_next(another_block)
121+
122+
expect(block.content).to eq true
123+
end
112124
end
113125

114126
describe '#add_label' do

0 commit comments

Comments
 (0)