From d1240b1f6d706cb985c32cd0a20800c758ca930c Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Tue, 30 Jan 2018 19:01:08 +0100 Subject: Spec: Make specs compatible with Asciidoctor 1.5.6 1) Failure/Error: should have_anchor href: 'doc-a.html', text: 'doc-a.html' "doc-a.html" expected within "a[href='doc-a.html']" in following template:

[doc-a]

2) Failure/Error: should have_anchor href: 'missing.html', text: 'missing.html' "missing.html" expected within "a[href='missing.html']" in following template:

[missing]

3) Failure/Error: should have_anchor href: 'doc-a.html#missing', text: 'doc-a.html' "doc-a.html" expected within "a[href='doc-a.html#missing']" in following template:

[doc-a#missing]

--- spec/integration_spec.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index 883bbb2..826fa5b 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -67,7 +67,8 @@ describe 'Intengration Tests' do context 'when extension is not active' do specify 'renders path of the referenced document as reftext' do given 'xref:doc-a#[]', extensions: [] - should have_anchor href: 'doc-a.html', text: 'doc-a.html' + # Note: Asciidoctor 1.5.6 and 1.5.6.1 behaves differently. + should have_anchor href: 'doc-a.html', text: /doc-a/ end end end @@ -77,14 +78,16 @@ describe 'Intengration Tests' do context 'without fragment' do it 'renders path of the non-existent document as reftext' do given 'xref:missing#[]' - should have_anchor href: 'missing.html', text: 'missing.html' + # Note: Asciidoctor 1.5.6 and 1.5.6.1 behaves differently. + should have_anchor href: 'missing.html', text: /missing/ end end context 'with non-existent fragment' do it 'renders path of the referenced document as reftext' do given 'xref:doc-a#missing[]' - should have_anchor href: 'doc-a.html#missing', text: 'doc-a.html' + # Note: Asciidoctor 1.5.6 and 1.5.6.1 behaves differently. + should have_anchor href: 'doc-a.html#missing', text: /doc-a/ end end end -- cgit v1.2.3