When PesterThrow catches an unexpected exception, record the source of the exception into the exception message
of the exception into the exception message
Pester.bat is used locally to test the whole suite in clean environment and on server to integrate with Team City. This way we can make sure the module is kept strict mode compatible.
Fixes #73 Several calls to built-in PowerShell commands are now module-qualified, making Pester behave properly internally, even if the caller has mocked these commands.
Loosely related to the fix in the Issue76 branch, this update validates user input to the Should function. Instead of producing the stock command not found exception, Should will now produce an error of "'BeNulOrEmpty' is not a valid Should operator." (where the user had misspelled BeNullOrEmpty, in this case.)
"It" initializes $PesterException for Strict Mode compatibility. Fixes #75
Parse-ShouldArgs now works properly if StrictMode has been enabled, performing bounds checking on the $shouldArgs array before indexing. It also throws an error if no AssertionMethod was passed (ie, ( | Should ) or ( | Should not )). Fixes #76
Also fixing the TC build again
the & made the nUnit.xml impossible to parse. quick-fixing this. There is #122 issue for this.
Sort the folders before deleting to avoid error Fixes #128
* internal module methods * alias commands * application commands * filter commands Added partial mocking support for: * fully-qualified command names (fully qualified cmdlet invocations are not supported) * external script commands The only supported scenarios are when the script is invoked using one of the following methods: scriptName.ps1 & scriptName.ps1 . scriptName.ps1 Added corresponding unit tests.
If fixture is not specified, typically when you start the script block on next line, an exception is thrown from Describe. Fixing #132
[fixes #130] Changed ExecutionPolicy to Bypass to avoid failure.
It would appear combining the flags -ExecutionPolicy Unrestricted and -NonInteractive causes the following error; Import-Module : File E:\Pester\Pester.psm1 cannot be loaded. The file E:\Pester\Pester.psm1 is not digitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details.. See the following TechNet article for details on ExecutionPolicy settings; http://technet.microsoft.com/en-us/library/hh849812.aspx
Instead of creating the Temp.ps1 script in TestDrive the It blocks are processed directly in memory. Fixes #123
Fixing issue introduced in 605ee37. Hash tags placed around Describe name in auto-generated test files.
Fix the tag filter that I broke. We really need a test for this.
- Moved New-Fixture and Create-File to separate script file - Discarded Write-UsageForNewFixture. Usage can be looked up by Get-Help, so inline help becomes the only place to update if interface changes.
- Accept and resolve paths on input as other cmdlets do. - Output standard objects. - Using only Name parameter you can create fixture in the current directory . - If file exists Warning is issued. - Numerous internal amendments to make the function easier to read. - Adding Tests - not moving the function out of Pester.psm1 to make the changes easier to track.
… as -Path parameter. Restricts parameters to [string] instead of letting powershell decide which datatype to use
When called with -PassThru the Invoke-Pester returns object on exit. The object contains information about the whole run and about each test.
Moving the margin before the [+] in the test output. This makes for a tree-like structure in which it is easier to see what tests are in Describe and what are in Context
Standard PowerShell cmdlets use singular nouns for their Parameters and standardized set of parameter names like 'Path'. Changing Invoke-Pester interface to reflect this. To keep backwards compatibility the changed parameters are aliased.