diff --git a/bin/cmdtest.rb b/bin/cmdtest.rb index 56f2289..b93cbb7 100755 --- a/bin/cmdtest.rb +++ b/bin/cmdtest.rb @@ -282,8 +282,8 @@ module Cmdtest @orig_env_path.dup end - def test_files_dir - @project_dir.test_files_dir + def test_files_top + @project_dir.test_files_top end def run(clog) @@ -341,6 +341,10 @@ module Cmdtest File.expand_path(File.dirname(test_filenames[0]), ORIG_CWD) end + def test_files_top + ORIG_CWD + end + private def _fs_test_filenames diff --git a/lib/cmdtest/testcase.rb b/lib/cmdtest/testcase.rb index e506105..1516b11 100644 --- a/lib/cmdtest/testcase.rb +++ b/lib/cmdtest/testcase.rb @@ -103,7 +103,7 @@ module Cmdtest # the current directory at the time of the call. def import_file(src, tgt) - src_path = File.expand_path(src, @_runner.test_files_dir) + src_path = File.expand_path(src, @_runner.test_files_top) tgt_path = _cwd_path(tgt) FileUtils.mkdir_p(File.dirname(tgt_path)) FileUtils.cp(src_path, tgt_path)