spec/integration/text_field/spec.rb in pdf_ravager-0.0.8 vs spec/integration/text_field/spec.rb in pdf_ravager-0.1.0
- old
+ new
@@ -1,14 +1,14 @@
require 'integration/integration_helper'
describe 'a PDF with a text field' do
describe 'filled with foo' do
before(:each) do
- p = pdf do
- text 'text_field', 'foo'
+ p = PDFRavager::Template.new do |t|
+ t.text 'text_field', 'foo'
end
pdf_file = File.join(File.dirname(__FILE__), "pdf")
- @pdf_file = "#{mktemp}.pdf"
+ @pdf_file = mktemp('.pdf')
@pdf = p.ravage pdf_file, :out_file => @pdf_file
end
it 'should match expected.png when rendered' do
png = pdf_to_png(@pdf_file)