[rspec-users] Alternate File "require" line in TextMate bundle
Ashley Moran
work at ashleymoran.me.uk
Wed Oct 24 17:34:34 EDT 2007
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
More information about the rspec-users
mailing list