Rails Test Prescriptions
- 350 Seiten
- 13 Lesestunden
This comprehensive guide to testing Rails applications delves into Test-Driven Development (TDD) from both theoretical and practical perspectives. It addresses core Rails testing tools and procedures for Rails 2 and 3, while also introducing popular add-ons like Cucumber, Shoulda, Machinist, Mocha, and Rcov. If your Ruby on Rails application is plagued by bugs and unclear code, TDD can help. This proven process emphasizes writing tests first, leading to improved design, maintainability, and faster development of better code. Rails offers exceptional support for TDD, complemented by a vibrant community that continually develops new testing tools. The guide features practical code examples alongside discussions on the efficacy of testing. It begins with the essential features of core Ruby on Rails and progresses to third-party testing tools such as RSpec, Shoulda, Cucumber, Factory Girl, and Rcov, explaining their usage and appropriate contexts. Covering both Rails 2.3.x and the initial 3.0 release, this resource is invaluable for Rails programmers who test their code. For those who don’t yet test, it serves as a crucial starting point to integrate testing into their development practices.

