Test for operators inside CSS predicates.

This commit is contained in:
Yorick Peterse 2014-10-07 09:32:34 +02:00
parent d960eb7cd5
commit 09315ea478
1 changed files with 9 additions and 0 deletions

View File

@ -13,5 +13,14 @@ describe Oga::CSS::Parser do
s(:test, nil, 'bar', s(:test, nil, 'baz'))
)
end
example 'parse a predicate testing an attribute value' do
parse_css('foo[bar="baz"]').should == s(
:test,
nil,
'foo',
s(:eq, s(:test, nil, 'bar'), s(:string, 'baz'))
)
end
end
end