Skip to content

Instantly share code, notes, and snippets.

@stej
Created January 13, 2012 15:38
Show Gist options
  • Save stej/1607017 to your computer and use it in GitHub Desktop.
Save stej/1607017 to your computer and use it in GitHub Desktop.
PSaint test file
# 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 }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment