Rails Test Prescriptions (Paperback)

Noel Rappin

買這商品的人也買了...

相關主題

商品描述

Your Ruby on Rails application is sick. It's got bugs. Nobody remembers what that tricky piece of code was supposed to do, and nobody can tell what it actually does. Deadlines are looming, but every time you make the slightest change to the code, something else breaks.

You need Test-Driven Development (TDD), a proven process for improving the design, maintainability, and long-term viability of software. In TDD, the tests come first, and then code is written to match the expectation of the test. Using TDD means writing better code faster.

Ruby on Rails has unparalleled support for TDD. In addition to the tools that Rails has built-in, a large and thriving testing community adds new tools at an accelerating rate. Rails Test Prescriptions is your guide to the entire Rails testing ecosystem.

Containing both practical code examples and discussion of why testing works, this book starts with the most basic features delivered as part of core Ruby on Rails. Once you've integrated those features into your coding practice, you'll want to use popular third-party testing tools such as RSpec, Shoulda, Cucumber, Factory Girl, and Rcov. Rails Test Prescriptions will show you how to use these tools and when they are appropriate. Rails Test Prescriptions will cover both the current Rails 2.3.x version as well as the initial 3.0 release.

If you are a Rails programmer who tests code, this book is an invaluable guide to the latest in available testing tools. If you are a Rails programmer who doesn't test code, then start testing immediately: this book can help.

商品描述(中文翻譯)

你的 Ruby on Rails 應用程式出現問題了。它有 bug。沒有人記得那段棘手的程式碼應該做什麼,也沒有人知道它實際上做了什麼。截止日期逼近,但每次你稍微修改程式碼,其他地方就會出問題。

你需要測試驅動開發(Test-Driven Development, TDD),這是一個改善軟體設計、可維護性和長期可行性的成熟流程。在 TDD 中,測試先行,然後根據測試的期望編寫程式碼。使用 TDD 可以更快地編寫更好的程式碼。

Ruby on Rails 對於 TDD 有無與倫比的支援。除了 Rails 內建的工具外,一個龐大且蓬勃發展的測試社群以加速的速度提供新的工具。《Rails 測試處方》是你探索整個 Rails 測試生態系統的指南。

這本書包含實際的程式碼範例和討論測試的原因,從核心 Ruby on Rails 的基本功能開始介紹。一旦你將這些功能融入你的編碼實踐中,你會想要使用流行的第三方測試工具,如 RSpec、Shoulda、Cucumber、Factory Girl 和 Rcov。《Rails 測試處方》將向你展示如何使用這些工具以及何時適用。《Rails 測試處方》將涵蓋當前的 Rails 2.3.x 版本以及最初的 3.0 版本。

如果你是一個測試程式碼的 Rails 程式設計師,這本書是對最新測試工具的寶貴指南。如果你是一個不測試程式碼的 Rails 程式設計師,那麼立即開始測試吧:這本書可以幫助你。