Sha256: dfe9cd34ad536b337457e5f0788ecd6d744a9afa4406ddec7281e4939a031372
Contents?: true
Size: 497 Bytes
Versions: 4
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: true require 'test_helper' class Thinreports::Generator::PrawnExt::TestWidthOf < Minitest::Test def setup @pdf = Prawn::Document.new end def test_width_of text_width = @pdf.width_of('abcd') @pdf.character_spacing(1) do expected_character_space_width = 1 * 3 assert_equal text_width + expected_character_space_width, @pdf.width_of('abcd') end @pdf.character_spacing(1) do assert_equal 0, @pdf.width_of('') end end end
Version data entries
4 entries across 4 versions & 1 rubygems