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 Validating Length

Max Alexander
Max Alexander
7,258 Points

5:13 is Jason supposed to change the display message?

I notice Jason copy and pastes another chunk of test code in the create_spec.rb file. At 5:13 he does not change the message to read something along the lines:

"displays an error when the todo list has a description less than 5 characters"

I'm guessing this is best practise so if the warning comes up during testing, you will know what's going on without too much deep diving.

Perhaps I'm just confused and have had a little too much coffee! :S

Thanks!

2 Answers

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

You are right, he forgot to do that (it's the same in the code for download). I guess people mostly just copied the code in their own editor and changed the message without realizing Jason did not, at least that 's what I did and never noticed Jason's complete code ;).

Max Alexander
Max Alexander
7,258 Points

Haha! I'll wait for my award ;)

I was not aware you can just download the code! I've just been coding along....... probably for the best though! :)

Thanks for the reply Maciej!

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

The code for download is very helpful if you're really stuck and want to compare your version with Jason's version to make sure you didn't miss anything ;). Also, you can check what versions of gems he's using, which can be helpful in some situations.