spec/pdfkit_spec.rb in pdfkit-0.4.1 vs spec/pdfkit_spec.rb in pdfkit-0.4.2
- old
+ new
@@ -75,12 +75,20 @@
pdfkit = PDFKit.new(File.new(file_path))
pdfkit.command[-2..-1].should == [file_path, '-']
end
it "should detect special pdfkit meta tags" do
- body = %{<html><head><meta name="pdfkit-page-size" content="Letter"/></head></html>}
+ body = %{
+ <html>
+ <head>
+ <meta name="pdfkit-page_size" content="Legal"/>
+ <meta name="pdfkit-orientation" content="Landscape"/>
+ </head>
+ </html>
+ }
pdfkit = PDFKit.new(body)
- pdfkit.command[pdfkit.command.index('--page-size') + 1].should == 'Letter'
+ pdfkit.command[pdfkit.command.index('--page-size') + 1].should == 'Legal'
+ pdfkit.command[pdfkit.command.index('--orientation') + 1].should == 'Landscape'
end
end
context "#to_pdf" do
it "should generate a PDF of the HTML" do