[rspec-devel] [ rspec-Patches-14142 ] Fix for bug #11602: Nested #have_tag specifications fails on the wrong line number

noreply at rubyforge.org noreply at rubyforge.org
Fri Sep 21 17:57:27 EDT 2007


Patches item #14142, was opened at 2007-09-21 23:57
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=14142&group_id=797

Category: expectation module
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Antti Tarvainen (tarvaina)
Assigned to: Nobody (None)
Summary: Fix for bug #11602: Nested #have_tag specifications fails on the wrong line number

Initial Comment:
This patch fixes the bug described at
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11602&group_id=797

I added two new examples to illustrate the limits of the bug fix. Now these two work:

#1 reported bug, now fixed
response.should have_tag("form[action=test]") {
  should have_tag("input[type=text][name=other_input]")
}

#2 also fixed
response.should have_tag("form[action=test]") {
  raise "Failed unexpectedly."
}


This doesn't work:

#3 doesn't work
response.should have_tag("form[action=test]") {
  assert false
}

I marked the third example "pending" in the specs. I am not sure if we want to support test/unit assertions inside rspec-style expectations. Do we support test/unit assertions elsewhere? What do you think?


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=14142&group_id=797


More information about the rspec-devel mailing list