Sha256: ec4c688f9728e4166441fd55b1293b0a2b80d4c2d35502be68b326137c7dd24c
Contents?: true
Size: 1.38 KB
Versions: 22
Compression:
Stored size: 1.38 KB
Contents
require "spec_helper" require "fileutils" RSpec.describe Metanorma::Iec do context "when xref_error.adoc compilation" do around do |example| FileUtils.rm_f "spec/assets/xref_error.err" example.run Dir["spec/assets/xref_error*"].each do |file| next if file.match?(/adoc$/) FileUtils.rm_f(file) end end it "generates error file" do expect do mock_pdf Metanorma::Compile .new .compile("spec/assets/xref_error.adoc", type: "iec", no_install_fonts: true) end.to(change { File.exist?("spec/assets/xref_error.err") } .from(false).to(true)) end end it "Warns of illegal doctype" do FileUtils.rm_f "test.err" Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true) = Document title Author :docfile: test.adoc :nodoc: :no-isobib: :doctype: pizza text INPUT expect(File.read("test.err")).to include "pizza is not a recognised document type" end it "Warns of illegal function" do FileUtils.rm_f "test.err" Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true) = Document title Author :docfile: test.adoc :nodoc: :no-isobib: :function: pizza text INPUT expect(File.read("test.err")).to include "pizza is not a recognised document function" end end
Version data entries
22 entries across 22 versions & 1 rubygems