Rails Test Prescriptions (Paperback)
暫譯: Rails 測試處方籤 (平裝本)

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 應用程式出現問題。它有錯誤。沒有人記得那段棘手的程式碼原本應該做什麼,也沒有人能告訴它實際上做了什麼。截止日期迫在眉睫,但每當您對程式碼進行最小的更改時,其他東西就會壞掉。

您需要測試驅動開發(Test-Driven Development, TDD),這是一個經過驗證的過程,用於改善軟體的設計、可維護性和長期可行性。在 TDD 中,測試是第一步,然後編寫程式碼以符合測試的期望。使用 TDD 意味著更快地編寫更好的程式碼。

Ruby on Rails 對 TDD 提供了無與倫比的支持。除了 Rails 內建的工具外,龐大且蓬勃發展的測試社群以加速的速度添加新工具。《Rails Test Prescriptions》是您了解整個 Rails 測試生態系統的指南。

本書包含實用的程式碼範例以及為什麼測試有效的討論,從 Ruby on Rails 的核心功能開始。一旦您將這些功能整合到您的編碼實踐中,您將希望使用流行的第三方測試工具,如 RSpec、Shoulda、Cucumber、Factory Girl 和 Rcov。《Rails Test Prescriptions》將向您展示如何使用這些工具以及何時適合使用它們。《Rails Test Prescriptions》將涵蓋當前的 Rails 2.3.x 版本以及最初的 3.0 版本。

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