# Suggested Patch for test\_helper.rb Template

**URL:** <https://www.ruby-forum.com/t/suggested-patch-for-test-helper-rb-template/89432>\
**Category:** Engines Development\
**Created:** [January 4, 2006, 6:13pm UTC](https://www.ruby-forum.com/t/suggested-patch-for-test-helper-rb-template/89432 "2006-01-04T18:13:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lanceball](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/5f9b8f/32.png) [@lanceball](https://www.ruby-forum.com/u/lanceball)\
**Post date:** [January 4, 2006, 6:13pm UTC](https://www.ruby-forum.com/t/suggested-patch-for-test-helper-rb-template/89432/1 "2006-01-04T18:13:52Z")

</div>

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
