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

Posted by 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
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.