fixed minitest warning and add a test