I have this test in a Rails application using Capybara:
within "#register" do
fill_in "Biography (optionnal)", :with => "Hello world!"
end
click_on "Save"
expect(find_field('user_bio').value).to eq('Hello world!')
Here is what I get from the test:
Failure/Error: expect(find_field('user_bio').value).to eq('Hello world!')
expected: "Hello world!"
got: "\nHello world!"
I never add a new line to the user_bio field manually.
Where could this come from?
Edit 1:
after some Googling, there seems to be a PR on Github for this, and it merged. Therefore, I think this is not a bug from Capybara. See https://github.com/jnicklas/capybara/commit/755a724d4b10e6841a0eeb58af43375236b33247
source
share