test/hexapdf/layout/test_text_layouter.rb in hexapdf-0.24.0 vs test/hexapdf/layout/test_text_layouter.rb in hexapdf-0.24.1
- old
+ new
@@ -1,11 +1,10 @@
# -*- encoding: utf-8 -*-
require 'test_helper'
require 'hexapdf/layout'
require 'hexapdf/document'
-require_relative "../content/common"
module TestTextLayouterHelpers
def boxes(*dims)
dims.map do |width, height|
box = HexaPDF::Layout::InlineBox.create(width: width, height: height || 0) {}
@@ -705,10 +704,10 @@
end
end
describe "Result#draw" do
def assert_positions(content, positions)
- processor = TestHelper::OperatorRecorder.new
+ processor = HexaPDF::TestUtils::OperatorRecorder.new
HexaPDF::Content::Parser.new.parse(content, processor)
result = processor.recorded_ops
leading = (result.select {|name, _| name == :set_leading } || [0]).map(&:last).flatten.first
pos = [0, 0]
result.select! {|name, _| name == :set_text_matrix || name == :move_text_next_line }.