From 028021ef4488b3c3d8382eab4b670ba60c0ca3d3 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Wed, 15 Jul 2015 11:33:30 -0700 Subject: [PATCH] test suite was not recognizing test file --- src/pester-tests/Test-Get-Alias.Tests.ps1 | 11 +++++------ src/pester-tests/Test-Get-Alias.ps1 | 3 +++ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 src/pester-tests/Test-Get-Alias.ps1 diff --git a/src/pester-tests/Test-Get-Alias.Tests.ps1 b/src/pester-tests/Test-Get-Alias.Tests.ps1 index fcbae8fa91..f7f67a5d1f 100644 --- a/src/pester-tests/Test-Get-Alias.Tests.ps1 +++ b/src/pester-tests/Test-Get-Alias.Tests.ps1 @@ -1,15 +1,14 @@ $here = Split-Path -Parent $MyInvocation.MyCommand.Path -$sut = "test-" + (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") +$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" Describe "Get-Alias" { - It "should return 3 objects" { + It "should return an array of 3 objects" { $val = Microsoft.PowerShell.Utility\Get-Alias a* $val.CommandType | Should Not BeNullOrEmpty - $val.Name | Should Not BeNullOrEmpty - $val.ModuleName | Should BeNullOrEmpty + $val.Name | Should Not BeNullOrEmpty + $val.ModuleName | Should BeNullOrEmpty - $val.Name[0] | Should Be "ac" - $val.Name[1] | Should Be "asnp" + $val.GetType().BaseType.Name | Should Be "Array" } } diff --git a/src/pester-tests/Test-Get-Alias.ps1 b/src/pester-tests/Test-Get-Alias.ps1 new file mode 100644 index 0000000000..9bdc128b77 --- /dev/null +++ b/src/pester-tests/Test-Get-Alias.ps1 @@ -0,0 +1,3 @@ +function test-Get-Alias{ + return Get-Alias a* +} \ No newline at end of file