Working in Cucumber with New lines and have_content

Angelegt von suung Tue, 15 Nov 2011 21:30:00 GMT

Problem:

 

  expected there to be content "\n2\n" in "\n2\n" (RSpec::Expectations::ExpectationNotMetError)

Research:

https://github.com/jnicklas/capybara/issues/56


Answer: WTF!

Solution:

  page.find(".#{count_name}-count").text.strip.should == "\n#{count}\n"