spec/lib/dest_spec.rb in br_danfe-0.0.8 vs spec/lib/dest_spec.rb in br_danfe-0.0.9

- old
+ new

@@ -50,11 +50,11 @@ it "renders xml to the pdf" do expect(File.exist?(output_pdf)).to be_falsey pdf.render_file output_pdf - expect("#{base_dir}dest#render-v2.00.pdf").to be_same_file_as(output_pdf) + expect("#{base_dir}dest#render-v2.00.pdf").to have_same_content_of file: output_pdf end end context "when nf-e's version is 3.10" do let(:xml_as_string) do @@ -90,11 +90,11 @@ it "renders xml to the pdf" do expect(File.exist?(output_pdf)).to be_falsey pdf.render_file output_pdf - expect("#{base_dir}dest#render-v3.10.pdf").to be_same_file_as(output_pdf) + expect("#{base_dir}dest#render-v3.10.pdf").to have_same_content_of file: output_pdf end end context "when recipient has CNPJ" do let(:xml_as_string) do @@ -112,11 +112,11 @@ it "renders xml to the pdf" do expect(File.exist?(output_pdf)).to be_falsey pdf.render_file output_pdf - expect("#{base_dir}dest#render-with_cnpj.pdf").to be_same_file_as(output_pdf) + expect("#{base_dir}dest#render-with_cnpj.pdf").to have_same_content_of file: output_pdf end end context "when recipient has CPF" do let(:xml_as_string) do @@ -134,11 +134,11 @@ it "renders xml to the pdf" do expect(File.exist?(output_pdf)).to be_falsey pdf.render_file output_pdf - expect("#{base_dir}dest#render-with_cpf.pdf").to be_same_file_as(output_pdf) + expect("#{base_dir}dest#render-with_cpf.pdf").to have_same_content_of file: output_pdf end end context "when recipient has IE" do let(:xml_as_string) do @@ -159,10 +159,10 @@ it "renders xml to the pdf" do expect(File.exist?(output_pdf)).to be_falsey pdf.render_file output_pdf - expect("#{base_dir}dest#render-with_ie.pdf").to be_same_file_as(output_pdf) + expect("#{base_dir}dest#render-with_ie.pdf").to have_same_content_of file: output_pdf end end end end