File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ switch ($settings) {
2222 Write-Verbose " - Manifest file path: [$manifestFilePath ]" - Verbose
2323 Resolve-PSModuleDependency - ManifestFilePath $manifestFilePath
2424 $PSModulePath = $env: PSModulePath -split [System.IO.Path ]::PathSeparator | Select-Object - First 1
25- New-Item - Path " $PSModulePath /$moduleName /999.0.0" - ItemType Directory - Name " " - Force
26- Copy-Item - Path $codePath - Destination " $PSModulePath / $moduleName /999.0.0 " - Recurse - Force
25+ $moduleInstallPath = New-Item - Path " $PSModulePath /$moduleName /999.0.0" - ItemType Directory - Force
26+ Copy-Item - Path $codePath - Destination $moduleInstallPath - Recurse - Force
2727 }
2828 ' SourceCode' {
2929 $codePath = Resolve-Path - Path ' src' | Select-Object - ExpandProperty Path
Original file line number Diff line number Diff line change @@ -11,12 +11,16 @@ Param(
1111Describe ' PSModule - Module tests' {
1212 Context ' Module' {
1313 It ' The module should be importable' {
14- { Import-Module - Name $Path } | Should -Not - Throw
14+ {
15+ $moduleName = Split-Path - Path $Path - Leaf
16+ Import-Module - Name $moduleName
17+ } | Should -Not - Throw
1518 }
1619 }
1720
1821 Context ' Module Manifest' {
1922 BeforeAll {
23+ $moduleName = Split-Path - Path $Path - Leaf
2024 $moduleManifestPath = Join-Path - Path $Path - ChildPath " $moduleName .psd1"
2125 Write-Verbose " Module Manifest Path: [$moduleManifestPath ]"
2226 }
You can’t perform that action at this time.
0 commit comments