[rspec-users] Cucumber ".should contain(expected) does but fails anyway

James Byrne lists at ruby-forum.com
Wed Apr 22 15:09:48 EDT 2009


David Chelimsky wrote:
> On Wed, Apr 22, 2009 at 1:45 PM, James Byrne <lists at ruby-forum.com> 
> wrote:
>> this worked:
>> I am not throwing out RSpec or using it any less. �I just had to get
>> � � � � � � got "<title>Bank of Canada: Noon Foreign Exchange
>> Rates</title>"
>>
>> � � �(equal?: expected object is not the object returned, did you mean
>> '==')
>> � � � (Spec::Expectations::ExpectationNotMetError)
> 
> I can live with that. Do you want to make a patch? If not I'll just add 
> it.

I'll try and make a patch first.  If that does not work out then I will 
beg a boon of you to do it.

I think that the error message should change too. Instead of:

        expected "<title>Bank of Canada: Noon Foreign Exchange
Rates</title>"
             got "<title>Bank of Canada: Noon Foreign Exchange
Rates</title>"

An equal? failure probably should return the metaclass like:

        expected "#<Class:#<String:0x2b6950315300>>"
             got "#<Class:#<String:0x2b695026e898>>"

yada yada....

WDYT?
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list