From e1832adc970539312f61e88e71444cf22ec60549 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Sun, 5 Oct 2014 10:09:21 +0200 Subject: [PATCH] Specs for parsing CSS node test wildcards. --- spec/oga/css/parser/wildcards_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/oga/css/parser/wildcards_spec.rb diff --git a/spec/oga/css/parser/wildcards_spec.rb b/spec/oga/css/parser/wildcards_spec.rb new file mode 100644 index 0000000..3568a91 --- /dev/null +++ b/spec/oga/css/parser/wildcards_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe Oga::CSS::Parser do + context 'wildcards' do + example 'parse a wildcard name test' do + parse_css('*').should == s(:test, nil, '*') + end + + example 'parse a wildcard namespace test' do + parse_css('*|foo').should == s(:test, '*', 'foo') + end + + example 'parse a wildcard namespace and name test' do + parse_css('*|*').should == s(:test, '*', '*') + end + end +end