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

Rails tests

I have just watched a video for building an odot and noticed that Jason writes a tons of tests for this simple application instead of writing and improving this app. Is that all really necessary for such a small app ? I know it might be for building a good habits but it seems to me as a waste of time for now..

What is your opinion ?

1 Answer

This is a holy war you're about to start.

In my opinion, a starting rails developer (especially if you're looking to make a career of it) should be writing unit tests and capybara scenarios for any project. Learning to write fundamentally good tests is just as important as learning to write code in your application. It also speeds up the understanding of rails and how it operates.

When learning Ruby one of the first things I did was pick a class (like Array), lookup the docs and started writing specs for it. This not only taught me how to test an array, but also how to write tests! It should be no different for rails!