# coding: utf-8 require "asciidoctor-bibliography" describe "a typical usage of nocite" do let(:document) do input = <<~'ASCIIDOC' :bibliography-database: ./spec/fixtures/database.bib :bibliography-style: apa == Hidden citations Nothing here: nocite:[Lane12a]. Nothing here: nocite:[Erdos65]+special[Einstein35]. == Default bibliography bibliography::[] == Special bibliography bibliography::special[] ASCIIDOC document = ::Asciidoctor::Document.new(input) document.parse document end it "hides citations and show references" do expect(document.convert).to eq <<~HTML.rstrip

Hidden citations

Nothing here: . Nothing here: .

Default bibliography

Erdős, P., Heyting, A., & Brouwer, L. E. (1965). Some very hard sums. Difficult Maths Today, 30.

Lane, P. (2000). Book title. Publisher.

Special bibliography

Einstein, A., Podolsky, B., & Rosen, N. (1935). Can quantum-mechanical description of physical reality be considered complete? Physical Review, 47(10), 777.

HTML end end