Sha256: 1d7253949c852dc89a13f92898b701acc6eea185bf9f9782586ace75c20611fe
Contents?: true
Size: 919 Bytes
Versions: 1
Compression:
Stored size: 919 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper") describe 'Page' do it 'should create the page and write to the output directory' do page = GBDev::PDF::Page.new(File.expand_path(File.dirname(__FILE__) + '/../templates/certificate_template.pdf')) page.set_text(:full_name, 'Wes Hays') page.save_to(File.expand_path(File.dirname(__FILE__) + '/../output/wes_hays.pdf')) File.exist?(File.dirname(__FILE__) + '/../output/wes_hays.pdf').should be_true end it 'should create the page and write to the output directory with Kernel method' do page = PDFPage(File.expand_path(File.dirname(__FILE__) + '/../templates/certificate_template.pdf')) page.set_text(:full_name, 'Wes Hays') page.save_to(File.expand_path(File.dirname(__FILE__) + '/../output/wes_hays.pdf')) File.exist?(File.dirname(__FILE__) + '/../output/wes_hays.pdf').should be_true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gbdev-pdf_filler-0.2.0 | spec/lib/pdf_page_spec.rb |