Alternate File "require" line in TextMate bundle

Ok, this is INCREDIBLY finicky of me, and I’m a really finicky person
at the best of times, but I noticed that when you use the TM
Alternate File command to create specs, it does it with a header line
like this:

File.dirname(FILE) + ‘/…/…/…/spec_helper’

I use a header line like this

require File.expand_path(File.join(File.dirname(FILE), *%w
[… … … spec_helper.rb]))

(Think I nicked it from some of David’s code)

Does the former expose you to loading the spec_helper twice under any
circumstances? Just wondered, as I had to check there was nothing
going on in my spec_helper that shouldn’t be run more than once

Ashley


blog @ http://aviewfromafar.net/
linked-in @ http://www.linkedin.com/in/ashleymoran
currently @ home

On Oct 24, 2007, at 10:34 pm, Ashley M. wrote:

Does the former expose you to loading the spec_helper twice under any
circumstances?

I answered my own question - autotest will barf if it is forced to
require something twice that shouldn’t be. As it happens, it’s the
facets monkey-patch I posted earlier, which causes a stack overflow
because of the way it redefines a method.

Is this worth filing a ticket for?

Ashley


blog @ http://aviewfromafar.net/
linked-in @ http://www.linkedin.com/in/ashleymoran
currently @ home

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs