mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Fix Pester tests
The `Get-Process` cmdlet cannot be used for these types of tests due to security constraints on OS X. These tests are about to be re-written soon anyway, so the simple fix was to use another cmdlet.
This commit is contained in:
1 parent
86d7d749bb
commit
53bfc80b56
9 files changed
+73
-117
No files matched your search
@@ -20,17 +20,6 @@ Describe "Measure-Object" {
|
||||
$actual | Should Be $expected
|
||||
}
|
||||
|
||||
It "Should be able to get additional stats" {
|
||||
$actual = Get-Process | Measure-Object -Property workingset64 -Minimum -Maximum -Average
|
||||
|
||||
$actual.Average | Should BeGreaterThan 0
|
||||
$actual.Characters | Should BeNullOrEmpty
|
||||
$actual.Lines | Should BeNullOrEmpty
|
||||
$actual.Maximum | Should Not BeNullOrEmpty
|
||||
$actual.Minimum | Should Not BeNullOrEmpty
|
||||
$actual.Sum | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
Context "Numeric tests" {
|
||||
It "Should be able to sum" {
|
||||
$actual = $testObject | Measure-Object -Sum
|
||||
|
||||
Reference in new issue
Block a user