spec/lib/pdf_generator_spec.rb in medivo-0.1.13 vs spec/lib/pdf_generator_spec.rb in medivo-0.1.14
- old
+ new
@@ -19,22 +19,23 @@
:full_name => 'my full name',
:address => 'my address',
:first_name => 'me!!!!!',
:sched_date => 'todays date',
:app_date => 'my appt date',
- :app_time => 'my appt time',
+ :app_time => 'appt time', # small field .. so too much text will break test
:lab_name => 'LabCorp',
:lab_address => 'the lab address',
:order_number => 'the lab id'
}
path = medivo_fixture_path "uhc_requisition_cover_letter.pdf"
pdf_file = Medivo::PdfGenerator.variable_fields(path, fields)
text = pdf_to_text(pdf_file)
+ text = text.strip_space
fields.values.each do |value|
- text.should match value
+ text.should match value.strip_space
end
pdf_file.unlink
end
end
@@ -51,11 +52,11 @@
pdf_file = Medivo::PdfGenerator.variable_fields_with_images(
path,
{:director_name=>md},
[{:path=> img_path, :options=>{:at=> [40, 100], :width=>170, :height=>40}}]
)
- show_me_the_pdf(pdf_file, '/tmp/test.pdf')
+ #show_me_the_pdf(pdf_file, '/tmp/test.pdf')
text = pdf_to_text(pdf_file)
- text.should match "Catherine E. Palmier, M.D."
+ text.strip_space.should match "Catherine E. Palmier, M.D.".strip_space
pdf_file.unlink
end
end