From 09315ea47816e568a46cb76d848078a4624cf36f Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Tue, 7 Oct 2014 09:32:34 +0200 Subject: [PATCH] Test for operators inside CSS predicates. --- spec/oga/css/parser/predicates_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/oga/css/parser/predicates_spec.rb b/spec/oga/css/parser/predicates_spec.rb index fa01c97..cc3df16 100644 --- a/spec/oga/css/parser/predicates_spec.rb +++ b/spec/oga/css/parser/predicates_spec.rb @@ -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