require "simplecov"
SimpleCov.start do
add_filter "/spec/"
end
require "bundler/setup"
require "asciidoctor"
require "metanorma-iso"
require "rspec/matchers"
require "equivalent-xml"
require "metanorma"
require "metanorma/iso"
require "iev"
RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = ".rspec_status"
# Disable RSpec exposing methods globally on `Module` and `main`
config.disable_monkey_patching!
config.expect_with :rspec do |c|
c.syntax = :expect
end
end
def strip_guid(x)
x.gsub(%r{ id="_[^"]+"}, ' id="_"').gsub(%r{ target="_[^"]+"}, ' target="_"')
end
ASCIIDOC_BLANK_HDR = <<~"HDR"
= Document title
Author
:docfile: test.adoc
:nodoc:
:novalid:
:no-isobib:
HDR
ISOBIB_BLANK_HDR = <<~"HDR"
= Document title
Author
:docfile: test.adoc
:nodoc:
:novalid:
:no-isobib-cache:
HDR
FLUSH_CACHE_ISOBIB_BLANK_HDR = <<~"HDR"
= Document title
Author
:docfile: test.adoc
:nodoc:
:novalid:
:flush-caches:
HDR
CACHED_ISOBIB_BLANK_HDR = <<~"HDR"
= Document title
Author
:docfile: test.adoc
:nodoc:
:novalid:
HDR
LOCAL_CACHED_ISOBIB_BLANK_HDR = <<~"HDR"
= Document title
Author
:docfile: test.adoc
:nodoc:
:novalid:
:local-cache:
HDR
VALIDATING_BLANK_HDR = <<~"HDR"
= Document title
Author
:docfile: test.adoc
:nodoc:
:no-isobib:
HDR
BLANK_HDR = <<~"HDR"