diff options
Diffstat (limited to 'spec/cli_spec.rb')
| -rw-r--r-- | spec/cli_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index f3b39a2..e8980e3 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -10,7 +10,7 @@ describe 'asciidoctor-epub3' do end it 'exits with 1 when given nonexistent path' do - _, err, res = to_epub '/nonexistent' + _, err, res = to_epub Pathname.new('/nonexistent') expect(res.exitstatus).to eq(1) expect(err).to match(/input file \/nonexistent( is)? missing/) end @@ -21,8 +21,8 @@ describe 'asciidoctor-epub3' do _, err, res = run_command asciidoctor_epub3_bin, '--failure-level=ERROR', '-a', 'ebook-validate', - fixture_file('invalid.adoc'), - '-o', temp_file('invalid.epub') + fixture_file('invalid.adoc').to_s, + '-o', temp_file('invalid.epub').to_s expect(res.exitstatus).to eq(1) # Error from epubcheck expect(err).to include 'ERROR(RSC-012)' @@ -66,13 +66,13 @@ describe 'asciidoctor-epub3' do end def to_mobi in_file, out_file - skip_if_darwin - run_command asciidoctor_epub3_bin, '-a', 'ebook-format=mobi', in_file, '-o', out_file + skip_unless_has_kindlegen + run_command asciidoctor_epub3_bin, '-a', 'ebook-format=mobi', in_file.to_s, '-o', out_file.to_s end def to_epub in_file, out_file = nil - argv = asciidoctor_epub3_bin + ['-a', 'ebook-validate', in_file] - argv += ['-o', out_file] unless out_file.nil? + argv = asciidoctor_epub3_bin + ['-a', 'ebook-validate', in_file.to_s] + argv += ['-o', out_file.to_s] unless out_file.nil? run_command argv end end |
