Silence the logger during tests

Hello,

I have some tests that generate a lot of NOTICE messages from the logger
and I’d like to silence them for certain sections of the tests.

I’ve tried using…
RAILS_DEFAULT_LOGGER.silence { }

but that seems to have no effect at all.

Can somebody tell me how I can go about silencing the messages that
appear during the tests?

Thanks