spec/lib/pdf_generator_spec.rb in medivo-0.1.9 vs spec/lib/pdf_generator_spec.rb in medivo-0.1.10
- old
+ new
@@ -2,11 +2,11 @@
describe Medivo::PdfGenerator do
it "#variable_fields generates pdf by filling in the variables" do
name = "Duderoni"
- path = fixture_path "negative_results.pdf"
+ path = medivo_fixture_path "negative_results.pdf"
pdf_file = Medivo::PdfGenerator.variable_fields(path, {:patient_name=>name})
text = pdf_to_text(pdf_file)
text.should match name
end
@@ -22,11 +22,11 @@
:lab_name => 'LabCorp',
:lab_address => 'the lab address',
:order_number => 'the lab id'
}
- path = fixture_path "uhc_requisition_cover_letter.pdf"
+ path = medivo_fixture_path "uhc_requisition_cover_letter.pdf"
pdf_file = Medivo::PdfGenerator.variable_fields(path, fields)
text = pdf_to_text(pdf_file)
fields.values.each do |value|
text.should match value
end
@@ -39,11 +39,11 @@
Chief Medical Officer,
UnitedHealthcare Clinical Services
Southeast Region
MD
- path = fixture_path "uhc_requisition_cover_letter.pdf"
- img_path = fixture_path "Southeast.jpg"
+ path = medivo_fixture_path "uhc_requisition_cover_letter.pdf"
+ img_path = medivo_fixture_path "Southeast.jpg"
pdf_file = Medivo::PdfGenerator.variable_fields_with_images(path, {:director_name=>md}, [{:path=> img_path, :at=> [0, 120]}])
#open('/tmp/test.pdf', 'wb+') { |f| f.write pdf_file.read }
text = pdf_to_text(pdf_file)
text.should match "Catherine E. Palmier, M.D."
pdf_file.unlink