[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
Sat Sep 22 18:23:31 EDT 2007


Patches item #14142, was opened at 2007-09-21 21: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: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Antti Tarvainen (tarvaina)
>Assigned to: David Chelimsky (dchelimsky)
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?


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

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-09-22 22:23

Message:
Applied to r2622. Thanks for nailing this one!

I've left the pending example. My instinct is that we don't need to resolve that - but I want to think about it for another minute or two.

Cheers,
David

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

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