Skip to content

Commit 2b7f270

Browse files
committed
Build 2.0.1
1 parent c6484ef commit 2b7f270

2 files changed

Lines changed: 2 additions & 48 deletions

File tree

poshspec.psd1

0 Bytes
Binary file not shown.

poshspec.psm1

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -35,60 +35,14 @@ function Get-PoshspecParam {
3535
)
3636

3737
$assertion = $Should.ToString().Trim()
38-
<#
39-
if ($PSBoundParameters.ContainsKey("Target"))
40-
{
41-
$Target = '`"' + $Target + '`"'
42-
}
43-
44-
if ($PSBoundParameters.ContainsKey("Property"))
45-
{
46-
$Property = "'" + $Property + "'"
47-
}
48-
49-
if ($PSBoundParameters.ContainsKey("Qualifier"))
50-
{
51-
$Qualifier = "'" + $Qualifier + "'"
52-
}
53-
54-
#$targetName = $Target
55-
#>
38+
5639
if (-not $PSBoundParameters.ContainsKey("FriendlyName"))
5740
{
5841
$FriendlyName = $Target
5942
}
6043

6144
$expressionString = $TestExpression.ToString()
62-
<#
63-
$expandedTokens = foreach ($token in $tokens)
64-
{
65-
if ($token.Type -eq 'Variable')
66-
{
67-
$variable = Get-Variable $token.Content -ErrorAction SilentlyContinue
68-
if (-not [string]::IsNullOrEmpty($variable.Value))
69-
{
70-
$value = "'" + $variable.Value + "'"
71-
Write-Output -InputObject $value
72-
}
73-
else
74-
{
75-
Throw "Could not find a variable in scope by the name '$($token.Content)'"
76-
}
77-
}
78-
else
79-
{
80-
if ($token.Type -eq 'String') {
81-
Write-Output -InputObject ('"' + $token.Content + '"')
82-
} else {
83-
if ($token.Type -ne 'NewLine') {
84-
Write-Output -InputObject $token.Content
85-
}
86-
}
87-
}
88-
}
89-
90-
$expressionString = $expandedTokens -join " "
91-
#>
45+
9246
if ($PSBoundParameters.ContainsKey("Property"))
9347
{
9448
$expressionString += " | Select-Object -ExpandProperty '$Property'"

0 commit comments

Comments
 (0)