diff options
| author | Marat Radchenko <marat@slonopotamus.org> | 2020-01-21 10:41:17 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-21 10:41:17 +0300 |
| commit | bf0c9c44a4c55c91bfdec7fbb7662c69fc715f73 (patch) | |
| tree | 659738dd7dc650526828e2f6678df2ee3052ac84 /spec/cli_spec.rb | |
| parent | 461d5a7d21137764d34f1f2db2ad32e9a8158915 (diff) | |
Add test for Mobi generation (PR #237)
Diffstat (limited to 'spec/cli_spec.rb')
| -rw-r--r-- | spec/cli_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index ddcb901..1177f4e 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -15,7 +15,7 @@ describe 'asciidoctor-epub3' do expect(err).to match(/input file \/nonexistent( is)? missing/) end - it 'converts and validates sample book' do + it 'converts sample book to epub and validates it' do infile = example_file 'sample-book.adoc' outfile = temp_file 'sample-book.epub' @@ -23,4 +23,16 @@ describe 'asciidoctor-epub3' do expect(res.exitstatus).to eq(0) expect(File).to exist(outfile) end + + it 'converts sample book to mobi' do + # TODO: https://github.com/asciidoctor/asciidoctor-epub3/issues/236 + skip '#236: Kindlegen is unavailable for-bit MacOS' if darwin_platform? + + infile = example_file 'sample-book.adoc' + outfile = temp_file 'sample-book.mobi' + + _, _, res = run_command asciidoctor_epub3_bin, '-a', 'ebook-format=mobi', infile, '-o', outfile + expect(res.exitstatus).to eq(0) + expect(File).to exist(outfile) + end end |
