Skip to content

Commit

Permalink
add parent path of test file to include path when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arya committed Nov 10, 2008
1 parent bb975b7 commit d2092e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Support/RubyMate/run_script.rb
Expand Up @@ -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
Expand Down

0 comments on commit d2092e2

Please sign in to comment.