File: insulate_file2.lua

package info (click to toggle)
lua-busted 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 820 kB
  • sloc: sh: 198; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
test_module = require 'spec.cl_test_module'    --luacheck: ignore

describe('Tests require "cl_test_module" in this file', function()
  it('loads environment with "cl_test_module"', function()
    assert.is_not_nil(test_module)  --luacheck: ignore
    assert.is_not_nil(package.loaded['spec.cl_test_module'])
  end)
end)

describe('Tests require "pl" in another file', function()
  it('does not keep "List" in environment', function()
    assert.is_nil(List)    --luacheck: ignore
    assert.is_nil(package.loaded['pl.List'])
  end)
end)