|
13 | 13 |
|
14 | 14 | describe 'initialization' do |
15 | 15 | it 'creates a structure tree when marked: true' do |
16 | | - expect(structure_tree).to be_a(PDF::Core::StructureTree) |
| 16 | + expect(structure_tree).to be_a(described_class) |
17 | 17 | end |
18 | 18 |
|
19 | 19 | it 'does not create a structure tree when marked is not set' do |
|
90 | 90 |
|
91 | 91 | it 'includes ActualText in rendered PDF output' do |
92 | 92 | structure_tree.begin_element(:P) |
93 | | - span = structure_tree.begin_element(:Span, ActualText: 'selected') |
| 93 | + structure_tree.begin_element(:Span, ActualText: 'selected') |
94 | 94 | structure_tree.mark_content(:Span) do |
95 | 95 | renderer.add_content('BT /F1 12 Tf (X) Tj ET') |
96 | 96 | end |
|
142 | 142 | structure_tree.end_element |
143 | 143 |
|
144 | 144 | mcr = elem.data[:K].find { |k| k.is_a?(Hash) && k[:Type] == :MCR } |
145 | | - expect(mcr).not_to be_nil |
| 145 | + expect(mcr).to_not(be_nil) |
146 | 146 | expect(mcr[:MCID]).to eq(0) |
147 | 147 | end |
148 | 148 | end |
|
185 | 185 | structure_tree.end_element |
186 | 186 |
|
187 | 187 | # Render triggers before_render callback which calls finalize! |
188 | | - output = renderer.render |
| 188 | + renderer.render |
189 | 189 |
|
190 | 190 | root_data = renderer.state.store.root.data |
191 | 191 | expect(root_data[:StructTreeRoot]).to be_a(PDF::Core::Reference) |
|
214 | 214 | struct_root = renderer.state.store.root.data[:StructTreeRoot] |
215 | 215 | parent_tree = struct_root.data[:ParentTree] |
216 | 216 | expect(parent_tree).to be_a(PDF::Core::Reference) |
217 | | - expect(parent_tree.data[:Nums]).not_to be_empty |
| 217 | + expect(parent_tree.data[:Nums]).to_not(be_empty) |
218 | 218 | end |
219 | 219 |
|
220 | 220 | it 'assigns StructParents to pages with marked content' do |
|
0 commit comments