FREE Delivery in the UK.
Temporarily out of stock.
Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we dispatch the item.
Dispatched from and sold by Amazon. Gift-wrap available.
Rails Test Prescriptions ... has been added to your Basket
+ £2.80 UK delivery
Used: Good | Details
Condition: Used: Good
Comment: Ships from the USA. Please allow 2 to 3 weeks for delivery. Book shows minor use. Cover and Binding have minimal wear, and the pages have only minimal creases. Never settle for less.
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

Rails Test Prescriptions (Pragmatic Programmers) Paperback – 10 Mar 2011

See all formats and editions Hide other formats and editions
Amazon Price
New from Used from
"Please retry"
£23.50 £5.00
Promotion Message 10% Bulk Discount 1 Promotion(s)

Note: This item is eligible for click and collect. Details
Pick up your parcel at a time and place that suits you.
  • Choose from over 13,000 locations across the UK
  • Prime members get unlimited deliveries at no additional cost
How to order to an Amazon Pickup Location?
  1. Find your preferred location and add it to your address book
  2. Dispatch to this address when you check out
Learn more

There is a newer edition of this item:

£23.50 FREE Delivery in the UK. Temporarily out of stock. Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we dispatch the item. Dispatched from and sold by Amazon. Gift-wrap available.
click to open popover

Special Offers and Product Promotions

  • Save 10% on Books for Schools offered by when you purchase 10 or more of the same book. Here's how (terms and conditions apply) Enter code SCHOOLS2016 at checkout. Here's how (terms and conditions apply)

Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone

To get the free app, enter your mobile phone number.

Product details

Product Description

About the Author

Noel Rappin is a Senior Consultant at Obtiva. A Rails developer for five years, Noel has spoken at RailsConf and Windy City Rails, and is the author of Professional Ruby on Rails from Wrox Press. A blog relating to this book can be found at

Customer Reviews

There are no customer reviews yet on
5 star
4 star
3 star
2 star
1 star

Most Helpful Customer Reviews on (beta) 4.0 out of 5 stars 5 reviews
18 of 22 people found the following review helpful
2.0 out of 5 stars Confused, but possibly the best option 8 Jun. 2011
By D. Donaldson - Published on
Format: Paperback
Testing has been a gap in my Rails practice, and I got this book as part of a concerted effort to close that gap. I had some knowledge of the general options and types of testing that are available to Rails programmers, but like many who had come from other languages and frameworks, I didn't see the immediate necessity to incorporate testing into my work. But the reality is that testing is an important skill in the job market for Rails work, and I decided that I would take it seriously.

First off -- the book does do a creditable job of covering many options, and does a good job of delineating the differences between unit, functional, integration and acceptance testing - although it seems to go out of its way to blur the line between the latter two. Rails' own built-in Test::Unit is given a good introduction, as is what the author calls Controller testing. This is a reasonable name, but not necessarily the one you will encounter among the Rails community, and here is where one of the problems with this book arises.

Mr Rappin is not a gifted writer, and one problem is that his style lurches from conversational, "I remember trying this out" passages, to opaque, technical paragraphs that you may need some time to parse, or simply give up trying. The habit of drawing attention to his preferred naming conventions for things is part of the conversational part of the book that makes it read like course notes for a community college intro course.

And, Mr Rappin has not, it would seem, been granted the help of a top-notch editor. The book is replete with small typos, but more glaringly, with an at times bizarre approach to structure. Topics are frequently introduced without either foregrounding what they are for, or with references to other more advanced topics that are not explained. A good editor would have spotted these problems. The advanced topics of RSpec an Cucumber come up frequently in the context of their alternates, but withot any attempt to put them in perspective.

Examples are spread throughout the book, but the notation of the file they come from or should be inserted into are inconsistent, and sometimes entirely absent. This can be very confusing, especially if you're trying to read the book for an overview, before jumping in to try out the code provided. A good deal of the book is focused on using testing in various ways while developing a hypothetical group collaboration app called "Huddle". But this app is notional only, and a coherent listing that allows you to mark the progress of the development of the app, and see how testing fits in is absent. Even the idea of what Huddle does seems vague and undefined, which is ironic, since Rappin is trying to convince us that testing is an excellent way of defining an application or a feature, allowing us to see clearly what we are trying to achieve before we begin. On reflection, his book ends up being at times a pretty compelling argument against testing - perhaps some irony to be found there.

An example of the this is Rappin's introduction to acceptance testing. Acceptance testing is a powerful technique to clarify for a client what an app is meant to do, and, as Rappin insists at many points, is actually a design method, that precedes the actual writing of code. Rappin does a good job of drumming in the point that the word "test" implies a post-factum process, when in fact the best use of testing is to establish tests that fail, and then write code to satisfy them. But he introduces Cucumber, a testing approach that more than most really needs to precede code, at the end of the book, and in the context of the substantially complete Huddle app. Very strange.

The sections on RSpec are the best, and the overall impression of the book is that RSpec is the most flexible and detailed way to approach Rails app testing, without eliminating the need for things like Model testing. The weakest section is probably that on interface testing, admittedly a difficult subject, because of the underdevelopment of tools, and the ongoing reality that browser compatibility can't be done through testing.

Testing is something of a religious issue in the Rails community. Those who are not among the faithful are often skeptical that testing can really affect bottom-line productivity and accuracy. Rappin makes an anemic case for testing at the opening of the book, with a highly contrived an unconvincing example of how testing may cost you more time at the outset, or on simple projects (a common criticism), but that it "really" saves you tons of time overall. What Rappin, as the testing community in general fails to do, is to provide a convincing metric. Testing is about verifiability, and it seems little to ask that they support their belief with evidence. But again, it is a religious issue, and the demand for proof simply marks you as an apostate, so don't look for that kind of substantial support for testing in this book.

Testing is a rapidly changing field, and writing a book about it is fraught with the problem of obsolescence. Rappin has done a creditable job in this regard, and the book right now is not old enough to have too many glaring differences with reality and current practice. But it will have to be edited and parts rewritten as the field changes, and I hope that then the Pragmatic Programmers series will see fit to edit this book correctly, improve the structure and annotations, and generally bring what is currently a complete but confused mess up to the standard of a very good, clear one. In the mean time, there do not seem to be many published options, so despite its flaws, this may be the book to buy for those interested in incorporating Rails testing.
6 of 7 people found the following review helpful
5.0 out of 5 stars Excellent resource 26 Feb. 2011
By Pennomme - Published on
Format: Paperback
This is a great book if you're looking to understand:

(A) the various tools that can be used to test all the various parts of a Rails app
(B) how and when to use those tools.

This is a good overview of the "State of the Art", as of publication date, of the various testing technologies for Rails apps. It has good sections on the basic tools that come with Rails (the standard unit testing package and fixtures) including the often overlooked integration tests. Then it's on to the tools which don't come standard; Shoulda, RSpec, and Cucumber. The book does a good job of showing how to use these tools, and gives a thumbnail sketch of their philosophies, so you understand why they were built. The sections on the javascript and view testing tools Jasmine, WebRat and Capybara ("the rodents") are useful pointers towards what can be done with these tools, but it doesn't cover them in the same depth as some of the other tools.

I've found it to be a good tutorial, and a pretty good reference ("How do I set up an RSpec controller test again?"). Highly recommended.
2 of 2 people found the following review helpful
3.0 out of 5 stars Not the best book for a total testing noob... 20 Jan. 2012
By John Mark Locklear - Published on
Format: Paperback
I have been doing Rails programming for about a year and needed to add testing to my repertoire. I am about half way through the book and am disappointed with the number of examples that are not *in context* of an application. At the beginning of the book there were a handful of examples for a fictitious 'huddle' application. These examples where very helpful. However, the last few chapters (chapters 6,7,8,10) have had plenty of code samples, but these samples are outside the context of a real application, so they are not very helpful to the uninitiated. I am just getting to the section on RSpec, and there is code for a rspec version of huddle, so I am hopeful. What I am finding is that a majority of the book is more of reference manual, rather than a 'how do I use this in a real application'. Head First for Rails Testing anyone? If my impressions change any by the time I reach the end of he book (if I can make it) I will update this review.

Update: I finished the book, and my impressions did not change. Great reference manual, poor 'how to' manual.
2 of 3 people found the following review helpful
5.0 out of 5 stars Good Solid Overview 16 Mar. 2011
By Larry - Published on
Format: Paperback
The Rails testing landscape has blossomed far beyond Test Unit, and this book does a good job of describing the current alternatives, giving some background, pros, cons, and how to set up and use each one. Given the frequency with which many developers hop around, this book will prove invaluable in getting you up to speed quickly on whatever tools are being used in your new environment. It will also enable you to make informed decisions to use (or not use) something if you are starting from scratch.

As a final bonus, tech books are notorious sleep-inducers, but Noel has an excellent dry sense of humour that serves to turn this book into a smile-inducer instead.

We are finally realizing how important testing is, which makes this book a must-have for your coding toolbox (and career).
1 of 4 people found the following review helpful
5.0 out of 5 stars Everything you need for getting started 30 Mar. 2011
By J. Rasmusson - Published on
Format: Paperback
Noel has done a wonderful job aggregating, and curating the best rails practices and tools into one solid book.

It covers all the basics of unit testing, mocking, controllers, views, and gives nice gentle introductions to really helpful gems like webrat and others.

I also like how the book was broken up with sections dedicated to testing JavaScript and AJAX, along with a good intro to RSpec and behavior driven testing with Cucumber.

Whether you are a grizzled old testing vet, or you are just getting started with rails, Rails Test Prescriptions is bound to show you something you didn't know you could do before.
Were these reviews helpful? Let us know