Improve warns() test helper to better handle multiple calls
Merge pull request #2421 from wecc/warns-test-helper-improvement

Improve warns() test helper to better handle multiple calls