Created
January 13, 2012 15:41
Revisions
-
stej created this gist
Jan 13, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ # how should I setup $filePath so that the assert (or act) block can see it? $root = split-path $MyInvocation.MyCommand.Path . "$root\..\..\..\..\..\Lib\PSaint\init.ps1" ipmo "$root\..\InstallerPackage.psm1" -DisableNameChecking -Force $FilePath = "$root\FileList.nsi" setup { # or here # $FilePath = "$root\FileList.nsi" } test "Assert file" { act { Write-Host Reading file $filePath $content = get-content $filePath -EA stop } assert { Assert-That { $content.Length -gt 0 } } }