From 3a04b1da068919608358fe40c89d5ad97f3a7f5c Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 28 Aug 2015 16:50:34 +0200 Subject: [PATCH] Root element spec for "preceding-sibling" --- spec/oga/xpath/compiler/axes/preceding_sibling_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/oga/xpath/compiler/axes/preceding_sibling_spec.rb b/spec/oga/xpath/compiler/axes/preceding_sibling_spec.rb index 1cd0096..3666725 100644 --- a/spec/oga/xpath/compiler/axes/preceding_sibling_spec.rb +++ b/spec/oga/xpath/compiler/axes/preceding_sibling_spec.rb @@ -46,6 +46,14 @@ describe Oga::XPath::Compiler do end end + describe 'relative to the root element' do + describe 'preceding-sibling::*' do + it 'returns an empty NodeSet' do + evaluate_xpath(@document.children[0]).should == node_set + end + end + end + describe 'relative to an attribute' do describe 'preceding-sibling::*' do it 'returns an empty NodeSet' do