Skip to content

Commit f62664f

Browse files
committed
Rename module function and change the output
1 parent 623bccd commit f62664f

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

deploy/Invoke-SmokeTests.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ BeforeAll {
1313
# Import-Module "$PSScriptRoot\..\src\Template.PowerShell.ScriptModule" -Force
1414
}
1515

16-
Describe 'Get-HelloWorld' {
16+
Describe 'Get-TemplateDescription' {
1717
It 'Should return "Hello, World!"' {
18-
$expected = 'Hello, World!*'
19-
$result = Get-HelloWorld
20-
$result | Should -BeLike $expected
18+
$result = Get-TemplateDescription
19+
$result | Should -Not -BeNullOrEmpty
2120
}
2221
}
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
using module './Template.PowerShell.ScriptModule.psm1'
22

3-
Describe 'Get-HelloWorld' {
3+
Describe 'Get-TemplateDescription' {
44
It 'Should return "Hello, World!"' {
5-
$expected = 'Hello, World!*'
6-
$result = Get-HelloWorld
7-
$result | Should -BeLike $expected
5+
$result = Get-TemplateDescription
6+
$result | Should -Not -BeNullOrEmpty
87
}
98
}

src/Template.PowerShell.ScriptModule/Template.PowerShell.ScriptModule.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
6666
FunctionsToExport = @(
67-
'Get-HelloWorld'
67+
'Get-TemplateDescription'
6868
)
6969

7070
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
# This is just example code. You should replace this with your own code.
1+
# This is just example code. Run the _InitializeRepository.ps1 script to replace this file with your module.
22

3-
function Get-HelloWorld {
3+
function Get-TemplateDescription {
44
[CmdletBinding()]
55
Param ()
66

7-
Write-Output "Hello, World! This is example code that should be replaced with your own code."
7+
[string] $description = @'
8+
This module does nothing, but is part of a template git repository that you can clone to create new PowerShell script modules quickly and easily with boilerplate files and CI/CD workflows already defined.
9+
10+
For more information, visit the repository at https://github.com/deadlydog/Template.PowerShell.ScriptModule.
11+
'@
12+
13+
Write-Output $description
814
}

0 commit comments

Comments
 (0)