Can anyone assist my confusion on how to use
is_expected.to compile.and_raise(Puppet::Error, /some error/)?
I have a class where I have fail('some error') and it is only calls class ABC if parameters A=1, B=2, C=3, which I am using to test this functionality out.
If I have fail('some error') in class ABC, then all the RSPEC tests, but ones where classes aren't included, all fail. If I comment it out all of my tests pass but the one where I had compile.and_raise(/some error/).
What is the proper way to cause a failure condition to be tested / verified in RSPEC? Am I failing the wrong way?
Also why would this break the majority of the tests just by having fail in a child class?
Thanks for everyone's continuing help here.