diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-10-25 02:37:38 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-10-25 02:38:30 -0600 |
| commit | e112a7b22c9ba8087c181f1987f3602188fee964 (patch) | |
| tree | a787f03e358184eac21026564a7535d2eab95a4c | |
| parent | 7f84c008745041673fc3853f3705da32509e7388 (diff) | |
deactivate packaging tests if test suite is not run through Bundler
| -rw-r--r-- | spec/cli_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index c1277f1d..800f13d3 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -3,14 +3,6 @@ require_relative 'spec_helper' describe 'asciidoctor-pdf' do - context 'Packaging' do - it 'should install bin script named asciidoctor-pdf' do - bin_script = (Pathname.new Gem.bindir) / 'asciidoctor-pdf' - bin_script = Pathname.new Gem.bin_path 'asciidoctor-pdf', 'asciidoctor-pdf' unless bin_script.exist? - (expect bin_script).to exist - end - end - context 'Options' do it 'should print the version of Asciidoctor PDF to stdout when invoked with the -V flag', cli: true do out, _, res = run_command asciidoctor_pdf_bin, '-V' @@ -35,7 +27,15 @@ describe 'asciidoctor-pdf' do end end - context 'Require', if: (defined? Bundler) do + context 'Packaging' do + it 'should install bin script named asciidoctor-pdf' do + bin_script = (Pathname.new Gem.bindir) / 'asciidoctor-pdf' + bin_script = Pathname.new Gem.bin_path 'asciidoctor-pdf', 'asciidoctor-pdf' unless bin_script.exist? + (expect bin_script).to exist + end + end if defined? Bundler + + context 'Require' do it 'should load converter if backend is pdf and require is asciidoctor-pdf', cli: true do out, err, res = run_command asciidoctor_bin, '-r', 'asciidoctor-pdf', '-b', 'pdf', '-D', output_dir, (fixture_file 'hello.adoc'), use_bundler: true (expect res.exitstatus).to be 0 @@ -51,7 +51,7 @@ describe 'asciidoctor-pdf' do (expect err).to be_empty (expect Pathname.new output_file 'hello.pdf').to exist end - end + end if defined? Bundler context 'Theme' do it 'should use theme specified by pdf-theme attribute', cli: true do |
