summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-01-30 19:01:08 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-01-30 19:38:24 +0100
commitd1240b1f6d706cb985c32cd0a20800c758ca930c (patch)
treed1fbefd0cb4df27ee68a8ba9d987600d62244f76
parent51190a2a8195647a197a7c2cfe687b02a83907bc (diff)
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: <div class="paragraph"> <p><a href="doc-a.html">[doc-a]</a></p> </div> 2) Failure/Error: should have_anchor href: 'missing.html', text: 'missing.html' "missing.html" expected within "a[href='missing.html']" in following template: <div class="paragraph"> <p><a href="missing.html">[missing]</a></p> </div> 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: <div class="paragraph"> <p><a href="doc-a.html#missing">[doc-a#missing]</a></p> </div>
-rw-r--r--spec/integration_spec.rb9
1 files 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