Sha256: 6e8836d4e29a554e349ce588bf7b4923bba45c187d8fc629d1a9702f6b4fb529

Contents?: true

Size: 585 Bytes

Versions: 3

Compression:

Stored size: 585 Bytes

Contents

require File.dirname(__FILE__) + '/../integration_helper'

describe 'a PDF with a multiline text field' do
  let(:input_pdf) { File.join(File.dirname(__FILE__), "pdf") }

  context 'filled with FOO' do
    let(:template) {
      PDFRavager::Template.new do |t|
        t.text 'multilinetext', 'FOO' * 10000
      end
    }
    let(:expected) { File.join(File.dirname(__FILE__), "expected.png") }

    it 'matches expected.png when rendered' do
      pix_diff, _ = compare_pdf_to_png(ravage_to_temp_file(template, input_pdf), expected)
      expect(pix_diff).to eq(0)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pdf_ravager-0.2.2 spec/integration/multiline_text_field/spec.rb
pdf_ravager-0.2.1 spec/integration/multiline_text_field/spec.rb
pdf_ravager-0.2.0 spec/integration/multiline_text_field/spec.rb