Fix warnings in tests

should be in an ensure block