Forum: Rails Engines development Suggested Patch for test_helper.rb Template

D046cca1a33655b6285065ec89711389?d=identicon&s=25 Lance Ball (Guest)
on 2006-01-04 18:13
(Received via mailing list)
Hi there

I've been working with engines for a few weeks now and I've come
across a very minor issue with the generated test_helper.rb file.
When an engine is included in a project via a symlink (as opposed to
svn externals [which is probably what I should be doing anyway]) the
require in the generated file does not work.  By simply using
File.expand_path this problem goes away.

root/engines/trunk/generators/engine/templates/test/test_helper.rb

@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../../../test/test_helper' #
the default rails helper
+require File.expand_path(File.dirname(__FILE__) +
'/../../../../test/test_helper') # the default rails helper

Lance
This topic is locked and can not be replied to.