test/deadweight_test.rb in aanand-deadweight-0.0.2 vs test/deadweight_test.rb in aanand-deadweight-0.0.3

- old
+ new

@@ -18,9 +18,20 @@ should "not report used selectors" do assert !@result.include?('#foo') assert !@result.include?('#foo .bar') end + should 'strip pseudo classes from selectors' do + # #oof:hover (#oof does not exist) + assert @result.include?('#oof:hover'), @result.inspect + + # #foo:hover (#foo does exist) + assert !@result.include?('#foo:hover') + + # #rab:hover::selection (#rab does not exist) + assert @result.include?('#rab:hover::selection') + end + should "accept Procs as targets" do @dw.mechanize = true @dw.pages << proc { fetch('/index.html')