[rspec-devel] [ rspec-Bugs-9423 ] --diff is broken for Strings
noreply at rubyforge.org
noreply at rubyforge.org
Wed Mar 21 10:34:53 EDT 2007
Bugs item #9423, was opened at 2007-03-21 11:35
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=9423&group_id=797
Category: runner module
Group: None
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Aslak Hellesøy (aslak_hellesoy)
Assigned to: David Chelimsky (dchelimsky)
Summary: --diff is broken for Strings
Initial Comment:
To reproduce:
ruby bin/spec failing_examples/diffing_spec.rb --diff
Only the second example produces a diff, but both should.
I think this is a quite recent regression, and it seems to have to do with the arguments passed to Spec::Expectations#fail_with (spec/expectations.rb). For some odd reason it only diffs when the message is an Array of length 3, which doesn't happen when two different strings are compared. I got lost trying to figure out why.
----------------------------------------------------------------------
>Comment By: David Chelimsky (dchelimsky)
Date: 2007-03-21 14:34
Message:
FYI - Spec::Expectations#fail_with only diffs when it gets an Array because it needs to know what to diff. It becomes the burden of the matcher calling #fail_with to send it the right stuff to diff.
Any suggestions to improve that design?
----------------------------------------------------------------------
Comment By: David Chelimsky (dchelimsky)
Date: 2007-03-21 14:25
Message:
Fixed in branches/0.9-dev (rev 1636)
----------------------------------------------------------------------
Comment By: David Chelimsky (dchelimsky)
Date: 2007-03-21 11:52
Message:
FYI - this is in the 0.9-dev branch.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=9423&group_id=797
More information about the rspec-devel
mailing list