wowmock has been designed to work with [luaunit 2.1](https://github.com/rjpcomputing/luaunit) and [mockagne 1.0+](https://github.com/PunchWolf/mockagne), which you can install using [LuaRocks](http://luarocks.org/), but any testing framework and mock libraries that mimics mockagne interface should work.
Usage
-----
wowmock allows you to load a Lua file into a controlled environnement using [setfenv](http://www.lua.org/manual/5.1/manual.html#pdf-setfenv). The code has access to standard Lua globals as well as a small subsets of [WoW Lua functions](http://wowpedia.org/Lua_functions) (most are not implemented yet).
Most specific WoW API functions are *not* available, as they should be mocked.
```lua
function wowmock(filepath, globals, ...)
```
*`filepath` is the path to the file to load.
*`globals` will be used as a fallback _G. You pass a mock to define and check the call to WoW API
* The other parameters are passed as is to the file. With WoW file, you usually pass the addon name and a "private" table, which also can be a mock.
Sample
------
```lua
local LuaUnit = require('luaunit')
local mockagne = require('mockagne')
local wowmock = require('wowmock')
local when, verify = mockagne.when, mockagne.verify