jnicklas/capybara — pull request #600 by joliss (2012-01-08 22:23:50+00:00)
Title: RackTest::Node#text now normalizes whitespace like Selenium

RackTest::Node#text now normalizes whitespace like Selenium

Previously Rack::Test's #text method might have returned
" some text ", whereas now it returns "some text", just like
Selenium.

-------------------------

Rack::Test through Nokogiri gives us all the whitespace in #text, which I think is not very helpful for testing, and more importantly it's incompatible with Selenium. This patch fixes that.

I'm actually not convinced that this should be merged into master, since I think it might break existing test code and make people unhappy. My sense (which quite possibly could be off) is that it's more beneficial to be disciplined and wait with this change until version 2.0.

How do you feel about this?