spec/lib/pdf_generator_spec.rb in medivo-0.2.2 vs spec/lib/pdf_generator_spec.rb in medivo-0.2.3

- old
+ new

@@ -23,19 +23,19 @@ describe "#variable_fields generates pdf by filling in the variables" do it "simple cover letter" do name = "Duderoni" - path = medivo_fixture_path "hepc_negative_results.pdf" + path = medivo_pdf_fixture_path "hepc_negative_results.pdf" pdf_file = Medivo::PdfGenerator.variable_fields(path, {:patient_name=>name}) text = pdf_to_text(pdf_file) text.should match name pdf_file.unlink end it "for uhc requisition cover letter" do - path = medivo_fixture_path "uhc_requisition_cover_letter.pdf" + path = medivo_pdf_fixture_path "uhc_requisition_cover_letter.pdf" pdf_file = Medivo::PdfGenerator.variable_fields(path, uhc_cover_letter_fields) text = pdf_to_text(pdf_file) text = text.strip_space uhc_cover_letter_fields.values.each do |value| @@ -44,11 +44,11 @@ pdf_file.unlink end end it "#variable_fields_with_images accepts image param and stamps image onto pdf" do - path = medivo_fixture_path "uhc_requisition_cover_letter.pdf" - image_path = medivo_fixture_path "Southeast.jpg" + path = medivo_pdf_fixture_path "uhc_requisition_cover_letter.pdf" + image_path = medivo_img_fixture_path "southeast.jpg" pdf_file = Medivo::PdfGenerator.variable_fields_with_images( path, uhc_cover_letter_fields, [{:path=> image_path, :options=>{:at=> [40, 100], :width=>180, :height=>28}}] )