public
Description: have_tag() without Rails' assert_select()
Clone URL: git://github.com/pd/rspec_hpricot_matchers.git
example using both inner text and options
pd (author)
Tue Mar 04 16:32:42 -0800 2008
commit  0cbe53f8c21880ce88094f0cb75926c80ab31a8d
tree    e5246388dca795c083cb848f18ccb985f983147c
parent  e77bc4918cf337ecb8db47eddeac6a711255971c
0
...
25
26
27
 
28
29
30
...
25
26
27
28
29
30
31
0
@@ -25,6 +25,7 @@ passing an options hash:
0
     body.should have_tag('abbr', :count => 1) # exactly one
0
     body.should have_tag('dt', :minimum => 4) # at least 4
0
     body.should have_tag('dd', :maximum => 4) # at most 4
0
+ body.should have_tag('a.outgoing', /rspec/i, :count => 2)
0
 
0
 The :count key also accepts a Range, making the following equivalent:
0
 

Comments

    No one has commented yet.