From de3e06bee6a7c65aa250dbae1ec28779fc485dd6 Mon Sep 17 00:00:00 2001 From: KevinMarquette Date: Wed, 12 Apr 2017 19:46:56 -0700 Subject: [PATCH] testing feature specifications --- Spec/distribution.Steps.ps1 | 13 +++++++++++++ Spec/distribution.feature | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 Spec/distribution.Steps.ps1 create mode 100644 Spec/distribution.feature diff --git a/Spec/distribution.Steps.ps1 b/Spec/distribution.Steps.ps1 new file mode 100644 index 0000000..8bcec75 --- /dev/null +++ b/Spec/distribution.Steps.ps1 @@ -0,0 +1,13 @@ +Given 'We have functions to publish' { + "$psscriptroot\..\chronometer\public\*.ps1" | Should Exist +} +And 'We have a module' { + "$psscriptroot\..\chronometer\chronometer.psd1" | Should Exist + "$psscriptroot\..\chronometer\chronometer.psm1" | Should Exist +} +When 'The user searches for our module' { + Find-Module chronometer | Should Not BeNullOrEmpty +} +Then 'They can install the module' { + {Install-Module chronometer -Scope CurrentUser -WhatIf *>&1} | Should Not Throw +} \ No newline at end of file diff --git a/Spec/distribution.feature b/Spec/distribution.feature new file mode 100644 index 0000000..3a3737a --- /dev/null +++ b/Spec/distribution.feature @@ -0,0 +1,8 @@ +Feature: We need distribute our module to the public + It should be published someplace that is easy to find + + Scenario: A user needs to be able to find our module in the PSGallery + Given We have functions to publish + And We have a module + When The user searches for our module + Then They can install the module \ No newline at end of file