Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

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

#158

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.

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

State: new
Milestone: none
Assigned to: Chris Wanstrath Chris Wanstrath

Activity

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.