Ashley Moran
2007-Oct-24 21:34 UTC
[rspec-users] 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
Ashley Moran
2007-Oct-24 22:04 UTC
[rspec-users] Alternate File "require" line in TextMate bundle
On Oct 24, 2007, at 10:34 pm, Ashley Moran 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