Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Adding Validations to Todo Items

Nicholas Cordoba
Nicholas Cordoba
4,998 Points

Error message is displaying more content then it is suppose to.

Adding todo items displays an error with no content (FAILED - 1) is successful with valid content

Failures:

1) Adding todo items displays an error with no content Failure/Error: expect(page).to have_content("Content can't be blank.") expected to find text "Content can't be blank." in "There was a problem adding that todo list item. 1 error prohibited this todo item from being saved: Content can't be blank Content" # ./spec/features/todo_items/create_spec.rb:32:in `block (2 levels) in <top (required)>'

Finished in 0.13804 seconds 2 examples, 1 failure

Failed examples:

rspec ./spec/features/todo_items/create_spec.rb:24 # Adding todo items displays an error with no content

This is the error message. Any ideas? Thank you for the help.

What exactly are you trying to accomplish? Please be a little more specific so I can help :)

Nicholas Cordoba
Nicholas Cordoba
4,998 Points

My apologizes for this incredibly late response. My problem, when I follow the video, at the testing to see if the text box is empty. It seems that instead of resetting the input box, it leaves the code there and continues the error message as well.

There was a problem adding that todo list item. 1 error prohibited this todo item from being saved: Content can't be blank Content

That is what is given, but I think the program should reset the box. However, I am not really sure.