require "vcr" VCR.configure do |config| config.cassette_library_dir = "spec/vcr_cassettes" config.hook_into :webmock end require "simplecov" SimpleCov.start do add_filter "/spec/" end require "bundler/setup" require "asciidoctor" require "metanorma-standoc" require "rspec/matchers" require "equivalent-xml" require "metanorma" require "metanorma/standoc" require "rexml/document" 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 def xmlpp(x) s = "" f = REXML::Formatters::Pretty.new(2) f.compact = true f.write(REXML::Document.new(x),s) s end ASCIIDOC_BLANK_HDR = <<~"HDR" = Document title Author :docfile: test.adoc :nodoc: :novalid: :no-isobib: HDR DUMBQUOTE_BLANK_HDR = <<~"HDR" = Document title Author :docfile: test.adoc :nodoc: :novalid: :no-isobib: :smartquotes: false 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 LOCAL_ONLY_CACHED_ISOBIB_BLANK_HDR = <<~"HDR" = Document title Author :docfile: test.adoc :nodoc: :novalid: :local-cache-only: HDR VALIDATING_BLANK_HDR = <<~"HDR" = Document title Author :docfile: test.adoc :nodoc: :no-isobib: HDR NORM_REF_BOILERPLATE = <<~"HDR"
The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.
HDR BLANK_HDR = <<~"HDR"