Hide warning output when running specs #184
Labels
good first issue
An issue that provides a good intro to working with the Myst codebase. Be helpful!
spec
An issue with relating to the specs around the Myst codebase (native or in-language).
Milestone
Parser warnings that come up from various specs have been appearing in the output for a while now. I think they used to be hidden by a
MYST_ENV
variable being set totest
, but that isn't happening anymore.The proper solution for this is to use
interpret_with_mocked_output
for these specs so that the output is captured and can be tested properly (right now the specs just check if a warning was raised, not what that warning was).Most of the offending specs are probably using the
it_warns
helper method defined here:myst/spec/support/interpret.cr
Lines 76 to 83 in d501552
The fix would be to call
interpret_with_mocked_output(source)
from this method instead of creating a new Interpreter and running it directly, then checking the warnings from the interpreter object returned by that method.The text was updated successfully, but these errors were encountered: