remove obsolete mocking syntax for privates
Some checks failed
continuous-integration/drone Build is failing
Some checks failed
continuous-integration/drone Build is failing
This commit is contained in:
parent
2045dad063
commit
5b9cfd83ae
@ -14,10 +14,10 @@ BeforeAll {
|
|||||||
Describe "Resolve-Dependency" {
|
Describe "Resolve-Dependency" {
|
||||||
Context "Basic syntax check" {
|
Context "Basic syntax check" {
|
||||||
BeforeAll {
|
BeforeAll {
|
||||||
Mock -ModuleName 'PSCredentialStore' Get-ModuleBase {
|
Mock Get-ModuleBase {
|
||||||
return (Join-Path -Path $PWD -ChildPath '/resources')
|
return (Join-Path -Path $PWD -ChildPath '/resources')
|
||||||
}
|
}
|
||||||
Mock -ModuleName 'PSCredentialStore' Test-Module {
|
Mock Test-Module {
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ Describe "Resolve-Dependency" {
|
|||||||
Mock Get-ModuleBase {
|
Mock Get-ModuleBase {
|
||||||
if ($IsWindows) { return "C:\" }
|
if ($IsWindows) { return "C:\" }
|
||||||
elseif ($isLinux) { return "/" }
|
elseif ($isLinux) { return "/" }
|
||||||
} -ModuleName 'PSCredentialStore'
|
}
|
||||||
It "Missing dependency file should not cause an error" {
|
It "Missing dependency file should not cause an error" {
|
||||||
{ Resolve-Dependency -Name 'awesome' } | Should -Not -Throw
|
{ Resolve-Dependency -Name 'awesome' } | Should -Not -Throw
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user