blob: e71ecf3cf919738b33bac7dd5701eb651cb8e739 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
require_relative 'spec_helper'
describe 'API' do
context 'Asciidoctor.convert' do
it 'should return an instance of Prawn::Document' do
output = to_pdf 'hello', analyze: :document
(expect output).to be_a Asciidoctor::PDF::Converter
(expect output).to be_a Prawn::Document
(expect output.render).to start_with '%PDF'
end
end
context 'Asciidoctor.convert_file' do
it 'should return a doc whose converter is a Prawn::Document' do
input_file = Pathname.new fixture_file 'hello.adoc'
output = to_pdf input_file, to_dir: output_dir, analyze: :document
(expect output).to be_a Asciidoctor::PDF::Converter
(expect output).to be_a Prawn::Document
(expect output.render).to start_with '%PDF'
end
end
end
|