From 088335669d649d164af5d2e08630dbb7c7467a57 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Wed, 15 Jul 2015 16:27:53 -0700 Subject: [PATCH] fixed typo --- src/pester-tests/Test-Get-Content.Tests.ps1 | 28 +++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/pester-tests/Test-Get-Content.Tests.ps1 b/src/pester-tests/Test-Get-Content.Tests.ps1 index 1561958a2..b3c1654c1 100644 --- a/src/pester-tests/Test-Get-Content.Tests.ps1 +++ b/src/pester-tests/Test-Get-Content.Tests.ps1 @@ -3,26 +3,28 @@ $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" Describe "Test-Get-Content" { -<# - Dependencies: - 1. mkdir -#> It "Should throw an error on a directory " { # also tests that -erroraction SilentlyContinue will work. - Get-Content $HOME -ErrorAction SilentlyContinue| Should Throw - cat $HOME -ErrorAction SilentlyContinue| Should Throw - gc $HOME -ErrorAction SilentlyContinue| Should Throw - + Get-Content . -ErrorAction SilentlyContinue | Should Throw + cat . -ErrorAction SilentlyContinue | Should Throw + gc . -ErrorAction SilentlyContinue | Should Throw + type . -ErrorAction SilentlyContinue | Should Throw } It "Should deliver an array object when listing a file" { (Get-Content -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" - (Get-Content -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path" - } + (Get-Content -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path" + + (gc -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" + (gc -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path" + + (type -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" + (type -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path" + + (cat -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" + (cat -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path" - It "Should support pipelines" { - } -} +}