public
Description: have_tag() without Rails' assert_select()
Clone URL: git://github.com/pd/rspec_hpricot_matchers.git
expand the spec for nested expectations
ashleymoran (author)
Thu Mar 20 15:32:33 -0700 2008
pd (committer)
Fri Mar 21 07:48:25 -0700 2008
commit  e1b2ac5e4e5386d4ef85b533d582e89101838b00
tree    2a01e092d11ffbd9c33dc2d5aeb2f0624cc78dfd
parent  54f6522b2c0be754131ce1ee491c6245a34a174d
...
111
112
113
114
 
 
 
 
 
 
 
115
116
117
 
 
 
 
118
119
120
...
111
112
113
 
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
0
@@ -111,10 +111,20 @@ describe 'have_tag inner expectations' do
0
         </li>
0
       </ul>
0
     EOHTML
0
- html.should have_tag('li') do |li|
0
+
0
+ html.should have_tag('li', :count => 1) do |li|
0
+ li.should have_tag('a')
0
+ li.should have_tag('span')
0
+ end
0
+
0
+ html.should have_tag('li', :count => 1) do |li|
0
       li.should have_tag('a')
0
       li.should_not have_tag('span')
0
     end
0
+
0
+ html.should have_tag('li', :count => 2) do |li|
0
+ li.should have_tag('a')
0
+ end
0
   end
0
 
0
   it "should yield elements which respond to #body" do

Comments

    No one has commented yet.