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

Daniel Lopera
Daniel Lopera
2,067 Points

MiniTest or Rspec?

So I'm following the raiils track, and in the ruby foundations course Jay uses the MiniTest gem, but in the Build a Todo app with Laravel he uses the Rspec library. What are the differences with this two?

Which one should I choose for the development of a real/different project? Thanks a lot!

1 Answer

Brandon Barrette
Brandon Barrette
20,485 Points

So MiniTest comes standard with a Rails install. I have to say I found Rspec easier to follow and found much more documentation on it when I began learning how to write proper tests.

I think it's just a matter of personal preference. If you follow the old Treebook Rails courses, he used MiniTest. The ODOT courses switched to Rspec. Just like they used Bootstrap in the Treebook App and Foundation for the ODOT app.

I think the biggest thing to watch out for is that Rspec 3 was released recently and there are some changes that could throw you off if you aren't expecting them. So just be aware of that and do a little research on changes between Rspec 2 and 3 before getting started. I found this book helpful to get a basic understanding of what is all going on with Rspec.

https://leanpub.com/everydayrailsrspec