Closed Stephanevg closed 4 years ago
Hi @Stephanevg. PoshBotAttribute.ps1
should reside at the root of the module along side the PSD1 and PSM1. In the source, it lives under Classes
.
https://github.com/poshbotio/PoshBot/blob/master/PoshBot/Classes/PoshBotAttribute.ps1
If you run build task below, it will copy that file to the root of the built module under the out/PoshBot/<version>
folder. This file is critical as it contains the custom attributes you attach to functions or parameters to control how PoshBot handles the commands.
./build.ps1 -task build
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Thanks for the feedback @devblackops I just wanted to report this one - In case you were not aware of it.
Perhaps it would make sense to write this one done somewhere (Perhaps directly on the readme?) as all I did was a clone from you repo, and than I was kind of blocked. (Was trying to generate tests fro your module).
Hi, I was testing my cmdlet
write-CUPesterTEsts
to generate automatically pester tests for a module.The first test I launched gave this result back:
In other words, It tries to process that
PoshBotAttribute.ps1
file through theScriptsToProcess
attribute, but that file is not there. (And is not in any other folder of the repo btw).Is this a mistake? Is it safe to comment this line in the module manifest? Or do we need to have that PoshBotAttribute.ps1 to be present? If yes, what should it contain?
Cheers
edit
This is the pester test I used, which was automatically generated: