lua-resty-busted2

better openresty busted test unit framework

$ luarocks install lua-resty-busted2

## ngx.log
The ngx.log output can now be inspected.
```lua
it('DEBUG', function()
ngx.log(ngx.DEBUG, '1')
assert.error_log('1', ngx.DEBUG)
end)
```
`Notice`:
1. `CRIT`,`ALERT`,`EMERG` will throw error
2. `STDERR` will just output to std err
### When to clear the log
start a new `describe`,`context`,`file`,`suite` test.
If you want to clean up in every test.
```lua
context('every test clear log', function()
busted_ngx.each_test_clean_log()
ngx.log(ngx.ERR, '1')
it('1', function()
assert.no.error_log()
end)
it('2', function()
assert.no.error_log('1')
ngx.log(ngx.ERR, '2')
assert.error_log('2')
end)
end)
```

Versions

0.3.4-021 hours ago0 downloads
0.3.3-013 days ago2 downloads
0.3.2-014 days ago1 download
0.3.1-014 days ago1 download
0.3.0-018 days ago1 download
0.2.0-020 days ago(revision: 2)10 downloads
0.1.3-047 days ago18 downloads
0.1.2-070 days ago27 downloads
0.1.1-073 days ago0 downloads
0.1.0-073 days ago3 downloads

Dependencies

Manifests