Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

Odd Failure/Error

It doesn't match the video's failure where it expected to find text "There was a problem adding that todo list item." in "Added todo list item.".. Instead I receive the error below. How would I go along fixing it?

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

Failures:

1) Adding todo items displays an error with no content Failure/Error: expect(page).to have_content("There was a problem adding that todo list item.") expected to find text "There was a problem adding that todo list item." in "There was a problem addding that todo list item." # ./spec/features/todo_items/create_spec.rb:30:in block (3 levels) in <top (required)>' # ./spec/features/todo_items/create_spec.rb:29:inblock (2 levels) in <top (required)>'

Finished in 0.72913 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

Randomized with seed 60411

1 Answer

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Look closely at the error, what was expected and what it actually found on the page:

"There was a problem adding that todo list item."

"There was a problem addding that todo list item."

Thank you. I can't believe I didn't see that!