velesin/jasmine-jquery — pull request #55 by diazruy (2012-04-08 16:20:23+00:00)
Title: toHaveText returns false when there's white space around the text

When an element contains whitespace as part of the text (such as when
creating the HTML string with a templating library like _.template() in
Underscore.js), jQuery will return the preceding line breaks when
calling #text() on such an element. When we use toHaveText, we get false
even though the text does match.