Prepare next release 0.2.1.X #18
@ -20,6 +20,19 @@
|
||||
"Modules": [
|
||||
"bar"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "PSGet",
|
||||
"Modules": [
|
||||
"PowerShellGet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "PSGetMixed",
|
||||
"Modules": [
|
||||
"PowerShellGet",
|
||||
"foobar2000"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ function Resolve-Dependency {
|
||||
if ($res.count -eq 0) {
|
||||
return $false
|
||||
}
|
||||
elseif ($res.count -contains $false) {
|
||||
elseif ($res -contains $false) {
|
||||
return $false
|
||||
}
|
||||
else {
|
||||
|
@ -41,4 +41,13 @@ Describe "Resolve-Dependency" {
|
||||
Resolve-Dependency -Name 'awesome' | Should -Be $false
|
||||
}
|
||||
}
|
||||
Context "Testing input variations" {
|
||||
Mock Get-ModuleBase {return "{0}\resources" -f $PWD}
|
||||
It "Should return true if all given dependencies exist" {
|
||||
Resolve-Dependency -Name 'PSGet' | Should -Be $true
|
||||
}
|
||||
It "Mixed results should return false" {
|
||||
Resolve-Dependency -Name 'PSGetMixed' | Should -Be $false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user