Fixed to.have assertion with the only flag for strings

refs #12