CSS evaluator specs for IDs.

This commit is contained in:
Yorick Peterse 2014-11-11 00:21:28 +01:00
parent b9e1b51270
commit c15604a86f
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
require 'spec_helper'
describe 'CSS selector evaluation' do
context 'IDs' do
before do
@document = parse('<x id="foo" />')
end
example 'return a node set containing a node with a single ID' do
evaluate_css(@document, '#foo').should == @document.children
end
example 'return an empty node set for non matching IDs' do
evaluate_css(@document, '#bar').should == node_set
end
end
end