Rails 4 Test Prescriptions: Build a Healthy Codebase

Rails 4 Test Prescriptions: Build a Healthy Codebase

Noel Rappin

Does your Rails code be afflicted by bloat, brittleness, or inaccuracy? healing those issues of a standard dose of test-driven improvement. Rails four try Prescriptions is a complete advisor to how checks can help layout and write greater Rails functions. during this thoroughly revised variation, you will study why trying out works and the way to check successfully utilizing Rails four, Minitest five, and RSpec three, in addition to well known trying out libraries corresponding to factory_girl and Cucumber. Do what the general practitioner ordered to make your purposes think all greater. unintended effects may possibly comprise higher code, fewer insects, and happier developers.

Your Ruby on Rails software is in poor health. closing dates are looming, yet each time you are making the slightest switch to the code, anything else breaks. not anyone recollects what that difficult piece of code used to be alleged to do, and no-one can inform what it really does. Plus, it has insects. you wish test-driven improvement, a strategy for bettering the layout, maintainability, and long term viability of software.

Containing either sensible code examples and dialogue of why trying out works, this ebook begins with the main simple gains introduced as a part of middle Ruby on Rails. as soon as you could have built-in these positive aspects into your coding perform, you are going to the right way to use well known third-party checking out instruments similar to RSpec, Mocha, Cucumber, and factory_girl. you are going to try out the part components of a Rails software, together with the back-end version common sense and the front-end reveal good judgment. utilizing Rails examples, you are going to easy methods to use trying out to let your code to reply higher to destiny swap. Plus, you will see find out how to deal with real-world checking out situations.

This thoroughly revised variation includes a new instructional, in addition to new examples in the course of the publication. Many chapters, together with the JavaScript bankruptcy, have passed through significant alterations to mirror new instruments and new practices. And there are fresh chapters on trying out for protection, and trying out exterior services.

What You Need:Ruby 2.1, Rails 4

Show sample text content

Download sample