public
Fork of wycats/merb-core
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/auser/merb-core.git
Search Repo:
Fixed bug not allowing have_tag to be called without a attribute hash, 
even when one is not desired

Signed-off-by: Ezra Zygmuntowicz <ez@engineyard.com>
Ray Morgan (author)
Sat Mar 15 21:23:26 -0700 2008
ezmobius (committer)
Wed Mar 19 12:20:49 -0700 2008
commit  130ee1ee30e08e23cd4563bce954ecacff88a5b3
tree    3040cdac5906c6a4c6c493a49d6e8a59bc6201ba
parent  ce659ee9d210df80d177d686c836a20d5585c00b
...
285
286
287
288
 
289
290
291
...
285
286
287
 
288
289
290
291
0
@@ -285,7 +285,7 @@
0
   #
0
   # # Check for <div attr="val">
0
   # body.should have_tag(:div, :attr => :val)
0
- def have_tag(tag, attributes)
0
+ def have_tag(tag, attributes = {})
0
     HasTag.new(tag, attributes)
0
   end
0
 
...
29
30
31
 
 
 
 
 
 
 
 
 
 
32
33
34
...
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
0
@@ -29,6 +29,16 @@
0
     end
0
   end
0
   
0
+ describe "#have_tag" do
0
+ it "should work without options hash" do
0
+ have_tag(:html)
0
+ end
0
+
0
+ it "should work with options hash" do
0
+ have_tag(:html, {})
0
+ end
0
+ end
0
+
0
   describe "#get_elements" do
0
     it "should return an array of Hpricot::Elem objects for the results found by the query containing the filter string" do
0
       get_elements(:li, "item").size.should == 3

Comments

    No one has commented yet.