aboutsummaryrefslogtreecommitdiff
path: root/test/functional/preload.lua
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2015-03-01 14:49:48 -0500
committerJohn Szakmeister <john@szakmeister.net>2015-03-01 15:25:39 -0500
commitd8ef23849af0e57a35a87d477a468a9241f78ad8 (patch)
tree2cfb5e66fa62662e6ea6f3aac719ebad56928b16 /test/functional/preload.lua
parentea35062589142459ca657f3977d76636bf9bd29d (diff)
downloadrneovim-d8ef23849af0e57a35a87d477a468a9241f78ad8.tar.gz
rneovim-d8ef23849af0e57a35a87d477a468a9241f78ad8.tar.bz2
rneovim-d8ef23849af0e57a35a87d477a468a9241f78ad8.zip
tests: prevent busted from reloading the ffi module and others
It turns out that Busted started cleaning the environment in 2.0rc5 as a result of Olivine-Labs/busted#62. This, in turn, caused the ffi module to be reloaded for each spec file, and LuaJIT doesn't appreciate it. The net effect is an assertion error in LuaJIT. By using the --helper feature of Busted, we can pre-load some modules ahead of Busted and prevent it from reloading them--making LuaJIT happy again.
Diffstat (limited to 'test/functional/preload.lua')
-rw-r--r--test/functional/preload.lua5
1 files changed, 5 insertions, 0 deletions
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')