From e7b9654ce1477791b426c77e6f8de2d561dd6e19 Mon Sep 17 00:00:00 2001 From: Peter Honeder Date: Fri, 10 Jul 2015 11:34:42 -0700 Subject: [PATCH 1/4] added pester submodule --- .gitmodules | 3 +++ ext-src/pester | 1 + 2 files changed, 4 insertions(+) create mode 160000 ext-src/pester diff --git a/.gitmodules b/.gitmodules index 04020c84d..09e695b83 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "src/monad_app_base"] path = src/monad_app_base url = https://msostc.visualstudio.com/DefaultCollection/PS/_git/monad_app_base +[submodule "ext-src/pester"] + path = ext-src/pester + url = https://github.com/pester/Pester.git diff --git a/ext-src/pester b/ext-src/pester new file mode 160000 index 000000000..b26b3cc93 --- /dev/null +++ b/ext-src/pester @@ -0,0 +1 @@ +Subproject commit b26b3cc93644640331cf33b4ca9b7f2012e5adca From 0e12ab46e324ab9bade736ba8f6a8ef3c9362f8d Mon Sep 17 00:00:00 2001 From: Peter Honeder Date: Fri, 10 Jul 2015 11:35:26 -0700 Subject: [PATCH 2/4] add pester to Makefile, re-pin to latest monad fixes --- scripts/Makefile | 1 + src/monad | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile b/scripts/Makefile index e1c29196e..a25bf8f42 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -146,6 +146,7 @@ internal-prepare-exec_env: runps.sh cp -r dotnetlibs/*.exe exec_env/app_base cp -r dotnetlibs/lib* exec_env/app_base cp -r dotnetlibs/corerun exec_env/app_base + cp -r ../ext-src/pester exec_env/app_base/Modules/Pester cp runps.sh exec_env/app_base run: $(POWERSHELL_RUN_TARGETS) dotnetlibs/corerun dotnetlibs/Microsoft.PowerShell.Commands.Management.dll dotnetlibs/Microsoft.PowerShell.Commands.Utility.dll dotnetlibs/api-ms-win-core-registry-l1-1-0.dll internal-prepare-exec_env diff --git a/src/monad b/src/monad index 2ba6fb929..09cd9551a 160000 --- a/src/monad +++ b/src/monad @@ -1 +1 @@ -Subproject commit 2ba6fb9291bdb9bfea111369a6c236475bd3c686 +Subproject commit 09cd9551a2caebecc843b84e01aad7126ed7197a From c9d0f87ed1e8c9c675e9cb794030e477076fc9d7 Mon Sep 17 00:00:00 2001 From: Peter Honeder Date: Fri, 10 Jul 2015 11:46:30 -0700 Subject: [PATCH 3/4] changed pester url to our own fork --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 09e695b83..696341067 100644 --- a/.gitmodules +++ b/.gitmodules @@ -18,4 +18,4 @@ url = https://msostc.visualstudio.com/DefaultCollection/PS/_git/monad_app_base [submodule "ext-src/pester"] path = ext-src/pester - url = https://github.com/pester/Pester.git + url = mshttps://msostc.visualstudio.com/DefaultCollection/PS/_git/Pester From 07eaa4648b6b91804bf646cf0cfe3b71d521ba52 Mon Sep 17 00:00:00 2001 From: Peter Honeder Date: Fri, 10 Jul 2015 13:50:30 -0700 Subject: [PATCH 4/4] re-pin to pester fixes, added pester hello world test --- ext-src/pester | 2 +- scripts/pester/Get-HelloWorld.Tests.ps1 | 13 +++++++++++++ scripts/pester/Get-HelloWorld.ps1 | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 scripts/pester/Get-HelloWorld.Tests.ps1 create mode 100644 scripts/pester/Get-HelloWorld.ps1 diff --git a/ext-src/pester b/ext-src/pester index b26b3cc93..941efb9fb 160000 --- a/ext-src/pester +++ b/ext-src/pester @@ -1 +1 @@ -Subproject commit b26b3cc93644640331cf33b4ca9b7f2012e5adca +Subproject commit 941efb9fbfb56c0ffa5470b150dc7ca9c2ab350b diff --git a/scripts/pester/Get-HelloWorld.Tests.ps1 b/scripts/pester/Get-HelloWorld.Tests.ps1 new file mode 100644 index 000000000..eac96930e --- /dev/null +++ b/scripts/pester/Get-HelloWorld.Tests.ps1 @@ -0,0 +1,13 @@ +"starting test script" | out-host + +$here = Split-Path -Parent $MyInvocation.MyCommand.Path +$here | out-host +$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") +$sut | out-host +. "$here\$sut" + +Describe "Get-HelloWorld" { + It "outputs 'Hello world!'" { + Get-HelloWorld | Should Be 'Hello world!' + } +} diff --git a/scripts/pester/Get-HelloWorld.ps1 b/scripts/pester/Get-HelloWorld.ps1 new file mode 100644 index 000000000..c89b09a96 --- /dev/null +++ b/scripts/pester/Get-HelloWorld.ps1 @@ -0,0 +1,3 @@ +function Get-HelloWorld { + 'Hello world!' +}