Sha256: 643c5f8c9dfa3f895164fb6fde214ac4a4a684625f9d536b94a21f5220c065db
Contents?: true
Size: 963 Bytes
Versions: 1
Compression:
Stored size: 963 Bytes
Contents
require "spec_helper" describe Kitabu::Parser::PDF, prince: Kitabu::Dependency.prince? do let(:root) { SPECDIR.join("support/mybook") } before do Kitabu::Parser::HTML.new(root).parse Kitabu::Parser::PDF.new(root).parse end it "creates html with css identifier" do expect(root.join("output/mybook.pdf.html").read).to have_tag('html.pdf') expect(root.join("output/mybook.print.html").read).to have_tag('html.print') end it "sets stylesheet for print pdf" do expect(root.join("output/mybook.print.html").read).to have_tag('link[rel=stylesheet][href="styles/print.css"]') end it "sets stylesheet for pdf" do expect(root.join("output/mybook.pdf.html").read).to have_tag('link[rel=stylesheet][href="styles/pdf.css"]') end it "generates pdf file for print" do expect(root.join("output/mybook.print.pdf")).to be_file end it "generates pdf file" do expect(root.join("output/mybook.pdf")).to be_file end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kitabu-2.0.0 | spec/kitabu/parser/pdf_spec.rb |