Use loadModules and askUserModuleQuestions

This commit is contained in:
Rezart Qelibari
2022-03-08 12:42:48 +01:00
parent 79693877b2
commit 322a2aa757
14 changed files with 77 additions and 628 deletions

View File

@@ -1,10 +1,11 @@
Describe 'installModules'
Include ./install.sh
lop setoutput -l panic tostdout
output=()
runModule() { output=("$@") }
It 'does nothing if modules array is empty'
declare -A modulesToInstall=() answers=()
declare -A modulesToInstall=() moduleAnswers=()
called=false
generateModuleOptions() { called=true }
When call installModules
@@ -14,7 +15,7 @@ Describe 'installModules'
End
It 'calls the module without options if answers is empty'
declare -A answers=()
declare -A moduleAnswers=()
modulesToInstall=('/modules/my module')
When call installModules
The output should eq ''
@@ -23,7 +24,7 @@ Describe 'installModules'
End
It 'calls the module with given answers as options'
declare -A answers=('/modules/my module_name' 'hercules')
declare -A moduleAnswers=('/modules/my module_name' 'hercules')
modulesToInstall=('/modules/my module')
When call installModules
The output should eq ''