From a733869f534a91281356774589d87f2c70f1ed6c Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 13 Jun 2014 18:00:55 +0200 Subject: [PATCH] Use (name) nodes for @foo axes. --- spec/oga/xpath/parser/predicates_spec.rb | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/spec/oga/xpath/parser/predicates_spec.rb b/spec/oga/xpath/parser/predicates_spec.rb index d4a346a..29d939b 100644 --- a/spec/oga/xpath/parser/predicates_spec.rb +++ b/spec/oga/xpath/parser/predicates_spec.rb @@ -10,7 +10,11 @@ describe Oga::XPath::Parser do s( :node_test, s(:name, nil, 'foo'), - s(:eq, s(:axis, 'attribute', 'class'), s(:string, 'bar')) + s( + :eq, + s(:axis, 'attribute', s(:name, nil, 'class')), + s(:string, 'bar') + ) ) ) ) @@ -26,8 +30,16 @@ describe Oga::XPath::Parser do s(:name, nil, 'foo'), s( :or, - s(:eq, s(:axis, 'attribute', 'class'), s(:string, 'bar')), - s(:eq, s(:axis, 'attribute', 'class'), s(:string, 'baz')) + s( + :eq, + s(:axis, 'attribute', s(:name, nil, 'class')), + s(:string, 'bar') + ), + s( + :eq, + s(:axis, 'attribute', s(:name, nil, 'class')), + s(:string, 'baz') + ) ) ) )