Even though have_css?
will do the trick, your tests should tell you how they failed, rather than just saying some condition was supposed to be true and it was false. With this in mind, the first example below reads much better than the second:
# IF FAILED => "expected 10, got 7"
page.all('table#myTable tr').count.should == 10
# IF FAILED => "expected true, got false"
page.should have_css("table#myTable tr", :count=>10)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…