spec/check_spec.rb in check_writer-0.3.0 vs spec/check_spec.rb in check_writer-0.3.1
- old
+ new
@@ -74,11 +74,10 @@
# Use this line to re-write the PDF we test against
# write_content_to_file('with_stubs', @data)
assert_data_matches_file_content('with_stubs', @data)
end
-
end
context "with stub table data" do
before(:each) do
@stub_table_data = [
@@ -96,10 +95,23 @@
# Use this line to re-write the PDF we test against
# write_content_to_file('with_stub_table_data', @data)
#assert_data_matches_file_content('with_stub_table_data', @data)
end
+ end
+ context "with signature image" do
+ before(:each) do
+ @check.signature_image_file = TEST_ASSETS + "/sample-signature.png"
+ @data = @check.to_pdf
+ end
+
+ it "generates a pdf with the signature image on the signature line" do
+ # Use this line to re-write the PDF we test against
+ # write_content_to_file('with_signature_image', @data)
+
+ assert_data_matches_file_content('with_signature_image', @data)
+ end
end
context "#to_prawn" do
it "returns a prawn object" do
@check.to_prawn.should be_a_kind_of(Prawn::Document)