public
Description: have_tag() without Rails' assert_select()
Clone URL: git://github.com/pd/rspec_hpricot_matchers.git
make the spec do what it said
pd (author)
Wed Mar 05 17:33:14 -0800 2008
commit  72534eab4d7154f790c97fb35a309e1a5a31cc5f
tree    ff67ef0e15047f31318df3c41e6b3d596ec76a29
parent  2a8b74b1d781daff3dfeaaffedc8cb6cbeff4a16
...
123
124
125
126
 
127
128
 
129
130
 
 
 
131
132
133
...
123
124
125
 
126
127
 
128
129
130
131
132
133
134
135
136
0
@@ -123,11 +123,14 @@ describe 'have_tag inner expectations' do
0
     end
0
   end
0
 
0
- it "should fail if any expectations fail within the block" do
0
+ it "should supports arbitrary expectations within the block" do
0
     html = %q{<span class="sha1">cbc0bd52f99fe19304bccad383694e92b8ee2c71</span>}
0
- html.should have_tag('span') do |span|
0
+ html.should have_tag('span.sha1') do |span|
0
       span.inner_text.length.should == 40
0
     end
0
+ html.should_not have_tag('span.sha1') do |span|
0
+ span.inner_text.length.should == 41
0
+ end
0
   end
0
 end
0
 

Comments

    No one has commented yet.