pester/Pester — pull request #187 by dlwyatt (2014-08-13 20:10:04+00:00)
Title: Fixing a mocking parameter bug

@Jaykul pointed out a problem where the `$args` variable in a mock's stub function can resolve to the value of `$args` in a parent scope; the automatic version of `$args` only exists for functions without the CmdletBinding attribute. (Mocks of cmdlets and advanced functions can demonstrate the bug, if a variable named `$args` is defined in a parent scope of the call to the mocked command.)

The prototype function used to generate these stubs now looks specifically for a variable named args in the local scope, not allowing it to fetch the parent scope's values.