Testing Spark Validator compilation warnings
I maintain some Ash Extensions that use Spark, and now have some ExUnit regression tests which used to assert_raise fine but now after upgrading ash deps for recent CVE spark also updated (2.2.68 to 2.3.5) and the Spark.Error.DslError's are no longer raised rather they are compile time warnings.
I'd still like to test my Validators though, and there is no ExUnit.assert_warning.
Likely that this has been encountered/solved some where in Ash already, what is the way forward here?
3 Replies
Solution
Yep, we were forced to make that change
The way we test that is by using ExUnit's
capture_io functionalityThanks Zach. For others what I did was added a Test.Util function
and used it like