From 5b9cfd83ae7b6c4cfa31362bb7a7ecedb6ab42a8 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Mon, 4 Jul 2022 12:45:08 +0200 Subject: [PATCH] remove obsolete mocking syntax for privates --- src/Private/Resolve-Dependency.Tests.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Private/Resolve-Dependency.Tests.ps1 b/src/Private/Resolve-Dependency.Tests.ps1 index 7c3f2a1..53ee91e 100644 --- a/src/Private/Resolve-Dependency.Tests.ps1 +++ b/src/Private/Resolve-Dependency.Tests.ps1 @@ -14,10 +14,10 @@ BeforeAll { Describe "Resolve-Dependency" { Context "Basic syntax check" { BeforeAll { - Mock -ModuleName 'PSCredentialStore' Get-ModuleBase { + Mock Get-ModuleBase { return (Join-Path -Path $PWD -ChildPath '/resources') } - Mock -ModuleName 'PSCredentialStore' Test-Module { + Mock Test-Module { return $true } } @@ -34,7 +34,7 @@ Describe "Resolve-Dependency" { Mock Get-ModuleBase { if ($IsWindows) { return "C:\" } elseif ($isLinux) { return "/" } - } -ModuleName 'PSCredentialStore' + } It "Missing dependency file should not cause an error" { { Resolve-Dependency -Name 'awesome' } | Should -Not -Throw }