Open DexterPOSH opened 8 years ago
I would say that is an architectural limitation of PoshSpec that will not be addressed in the short-term. I think there are two work arounds: you can create a loop for each State you want to test and hard code the test value; or, you can declare a variable with Global
scope.
Since the Assertion in the PoshSpec is placed inside a scriptblock, how does one reference variables in it e.g below works fine when the assertion is hardcoded -:
But when a variable is placed in the assertion, it can't see them e.g.
Above gives me the error -:
The idea is to use a CSV file as a template for all the service and their compliant status. How do I do something like this with PoshSpec ?