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 Write Our First Tests

Failed testing

I am writing the Odot app and when I run the test this is the error message I get. How can I resolve this issue?

Failed examples:

rspec ./spec/features/todo_lists/create_spec.rb:4 # Creating todo lists redirects to the todo list index page on success

3 Answers

Michelle Cannito
Michelle Cannito
8,992 Points

The course is written using Test Driven Development.

You write a test.

The test fails.

You write just enough code to get the test to pass.

In this course, the test will fail several times before passing because there are different things to update,

Just follow along. If the instructor's test passed and yours didn't, go back and check every character of code. Things like having todo_items instead of todo_item or missing punctuation can cause a mismatch in results.

If the instructor's test failed and yours did too, congratulations! You're doing things right.

Thanks, I am going to review my code because the instructor's code is passing. So I will check if I have typos, or any other issue in my code.

I identified the typos and now the it has passed.

Michelle Cannito
Michelle Cannito
8,992 Points

Yay! It is such a relief and good feeling when the tests finally pass!

Please mark my previous reply as best answer so I get 12 points. Thanks!

Okay, I will mark your answer and thanks for your help.