#158 new
Steve Ivy

[patch] me.should.be.instance_of Array is a bug

Reported by Steve Ivy | November 16th, 2007 @ 06:55 PM

I've been trying to track down what I thought was a bug in some changes to mofo that I'm working on, but I'm starting to think it's a bug in the xfn tests.

After having this test in xfn_tests.rb fail:

me = $xfn.me

me.should.be.an.instance_of Array

I finally started looking at the fixture - xfn_test.html. There's

actually only one valid rel="me" in the test data:

<dl class="valid">

<dt>Identity</dt>

<dd><a href="#me" rel="me">me</a> (exclusive of all other values)</dd>

</dl>

There are a slew of invalid rel="me *" links later in the document, but a recent change to mofo means that the valid rel="me" is the only one found. So I think that testing that $xfn.me is an instance_of Array is a bug.

I've included a patch that simply changes to checking for $xfn.friend instead, for which there are many valid links in the fixture.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

Attachments

Pages