Set enclosure environment for test_file

test_file() assumes that we are testing from the global environment
Since we are testing within a function, we need to pass the function's environment as the enclosure