Parsing support for the :only-child pseudo.

This commit is contained in:
Yorick Peterse committed 2014-11-03 23:27:56 +01:00
1 parent 759bb71d17
commit 2cf058457d
2 files changed
+21

No files matched your search

@@ -0,0 +1,12 @@
require 'spec_helper'
describe Oga::CSS::Parser do
context ':only-child pseudo class' do
example 'parse the :only-child pseudo class' do
parse_css(':only-child').should == parse_xpath(
'descendant-or-self::*[count(preceding-sibling::*) = 0 ' \
'and count(following-sibling::*) = 0]'
)
end
end
end