pester/Pester — pull request #183 by dlwyatt (2014-08-07 03:59:25+00:00)
Title: Debugging info in module scope

As @Jaykul pointed out in #180, file and line information output in failed tests is sometimes inaccurate. There were two problems that I know of in the Beta branch:

- When tests execute inside an `InModuleScope` block, file information was completely lost, and line numbers were wrong.
- When exceptions were thrown from something other than the `Should` command, you'd wind up seeing a line number from wherever the exception came from, but a file path to the Tests.ps1 script.

Both of these cases have been corrected, and failed test output should contain accurate information now.

As a nice perk, this also gets breakpoints working again for the parts of a test script contained within an `InModuleScope` block. (The same condition which led to the loss of file information also made breakpoints based on script / line number not work for those lines.)