IT Blog, Web Development,

Do You Want TDD for Your Ruby on Rails-Based Web App?

2 m read
QArea Expert
QArea Expert Marketing Manager
July 30, 2015
Share on
Reading Time: 2 minutes

TDD

Test-Driven Development is now practically everywhere. Agile is marching with miles-wide steps through development and only the lazy have not tried it yet (although, I believe, even the lazy have some clues as for now). How were things back in the day? Developers were writing code and it was tested at some point before the release by QA. And what is in trend now? Writing test cases before even a sample of a code’s logic is written, but does it work? Is the approach good enough for large-scale project and, more importantly, how will it cooperate with RoR (Ruby on Rails) and will you get all if you are a beginner with both?

Will RoR and TDD get along?

To tell you the truth RoR is great for Agile and TDD as it is really freeing developers from the necessity of writing repeated code as RoR emphasizes convention way over configuration. It is also great if combined with TDD due the fact RoR has rather short development routines.

How is TDD actually doing great with Ruby?

  • Phase of development is controlled and realistic
  • Developers are working on small pieces of code thus are saved from making many mistakes due early tests
  • TDD is great at assisting with building focus
  • Difficulties are avoided due careful analysis of what was done earlier

Are there downfalls?

Absolutely! There always are downfalls. TDD means every new feature is tested pretty much separately thus every new feature has the potential of injecting new bugs into the apps core code thus TDD may actually drain developers from any will to go on and resist defects as there are seemingly more and more of those. But, that’s pure theory. And thanks to the fact that TDD is actually about creating all the required tests of new features it reduces any design upfront dramatically.

As for me it is clear TDD and RoR are quite fit altogether, but only you may truly decide whether risks are worth the effort. There are supporting methodologies like Continuous Integration or even Continuous Delivery that can nullify downfalls of TDD, yet combining everything in one cycle is truly a subject for a different article.

Share on
Privacy Preference Center
Your Privacy

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.

Strictly Necessary Cookies Always Active

These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.

You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.

Performance Cookies

These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site.

All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.

Cookies used

Google Analytics
Functional Cookies

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.

Cookies used

Test Second Test
Targeting Cookies

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.

More Information

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.