Permalink
Browse files

add parent path of test file to include path when running tests

  • Loading branch information...
arya committed Nov 10, 2008
1 parent bb975b7 commit d2092e2897cdfa10e6dfbcd11b642d5ba77b025f
Showing with 2 additions and 1 deletion.
  1. +2 −1 Support/RubyMate/run_script.rb
@@ -12,11 +12,12 @@
path_ary = (ENV['TM_ORIG_FILEPATH'] || ENV['TM_FILEPATH']).split("/")
if index = path_ary.rindex("test")
test_path = File.join(*path_ary[0..-2])
+ test_parent_path = File.join(*path_ary[0..(path_ary.rindex('test'))])
lib_path = File.join( *( path_ary[0..-2] +
[".."] * (path_ary.length - index - 1) ) +
["lib"] )
if File.exist? lib_path
- cmd << "-I#{lib_path}:#{test_path}"
+ cmd << "-I#{lib_path}:#{test_path}:#{test_parent_path}"
end
end
end

0 comments on commit d2092e2

Please sign in to comment.