From 534de9d15ffe3e1f3c48715f2871432fabfda2a4 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Fri, 28 Aug 2015 16:07:11 -0700 Subject: [PATCH] Match array instead of testing elements So that we can ignore the ordering from the regexp --- src/pester-tests/Test-Split-Path.Tests.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pester-tests/Test-Split-Path.Tests.ps1 b/src/pester-tests/Test-Split-Path.Tests.ps1 index 5a50791b75..64aae88114 100644 --- a/src/pester-tests/Test-Split-Path.Tests.ps1 +++ b/src/pester-tests/Test-Split-Path.Tests.ps1 @@ -46,9 +46,10 @@ ls Test-Path $FullyQualifiedTestFile | Should Be $true Test-Path $FullyQualifiedTestFile2 | Should Be $true - ( Split-Path ./tmp/*estf*.ps1 -Leaf -Resolve ).GetType().BaseType.Name | Should Be "Array" - ( Split-path ./tmp/*estf*.ps1 -Leaf -Resolve )[0] | Should Be $testfile - ( Split-path ./tmp/*estf*.ps1 -Leaf -Resolve )[1] | Should Be $testfile2 + $actual = ( Split-Path ./tmp/*estf*.ps1 -Leaf -Resolve ) + $actual.GetType().BaseType.Name | Should Be "Array" + $actual | Should Match $testfile + $actual | Should Match $testfile2 Remove-Item $FullyQualifiedTestFile, $FullyQualifiedTestFile2