diff options
-rw-r--r-- | cmake/RunTests.cmake | 1 | ||||
-rw-r--r-- | test/functional/preload.lua | 5 | ||||
-rw-r--r-- | test/unit/preload.lua | 7 |
3 files changed, 13 insertions, 0 deletions
diff --git a/cmake/RunTests.cmake b/cmake/RunTests.cmake index 8f303bae2e..a4330a58de 100644 --- a/cmake/RunTests.cmake +++ b/cmake/RunTests.cmake @@ -15,6 +15,7 @@ endif() execute_process( COMMAND ${BUSTED_PRG} -v -o ${BUSTED_OUTPUT_TYPE} + --helper=${TEST_DIR}/${TEST_TYPE}/preload.lua --lpath=${BUILD_DIR}/?.lua ${TEST_PATH} WORKING_DIRECTORY ${WORKING_DIR} ERROR_VARIABLE err diff --git a/test/functional/preload.lua b/test/functional/preload.lua new file mode 100644 index 0000000000..5f34f7fa6e --- /dev/null +++ b/test/functional/preload.lua @@ -0,0 +1,5 @@ +-- Modules loaded here will not be cleared and reloaded by Busted. +-- Busted started doing this to help provide more isolation. See issue #62 +-- for more information about this. +local ffi = require('ffi') +local helpers = require('test.functional.helpers') diff --git a/test/unit/preload.lua b/test/unit/preload.lua new file mode 100644 index 0000000000..d8ec2c3943 --- /dev/null +++ b/test/unit/preload.lua @@ -0,0 +1,7 @@ +-- Modules loaded here will not be cleared and reloaded by Busted. +-- Busted started doing this to help provide more isolation. See issue #62 +-- for more information about this. +local ffi = require('ffi') +local helpers = require('test.unit.helpers') +local lfs = require('lfs') +local preprocess = require('test.unit.preprocess') |