Book description
Does your Rails code suffer from bloat, brittleness, or inaccuracy? Cure these problems with a regular dose of test-driven development. Rails 4 Test Prescriptions is a comprehensive guide to how tests can help you design and write better Rails applications. In this completely revised edition, you'll learn why testing works and how to test effectively using Rails 4, Minitest 5, and RSpec 3, as well as popular testing libraries such as factory_girl and Cucumber. Do what the doctor ordered to make your applications feel all better. Side effects may include better code, fewer bugs, and happier developers.
Table of contents
-
Rails 4 Test Prescriptions
- Copyright
- For the Best Reading Experience...
- Table of Contents
- Early praise for Rails 4 Test Prescriptions
- Acknowledgments
- Chapter 1: Introduction
- Chapter 2: Test-Driven Development Basics
- Chapter 3: Test-Driven Rails
- Chapter 4: What Makes Great Tests
-
Chapter 5: Testing Models
- What Can We Do in a Model Test?
- What Should I Test in a Model Test?
- Okay, Funny Man, What Makes a Good Set of Model Tests?
- Refactoring Models
- A Note on Assertions per Test
- Testing What Rails Gives You
- Testing ActiveRecord Finders
- Testing Shared Modules and ActiveSupport Concerns
- Write Your Own RSpec Matchers
- Modeling Data
- Chapter 6: Adding Data to Tests
- Chapter 7: Using Test Doubles as Mocks and Stubs
- Chapter 8: Testing Controllers and Views
- Chapter 9: Minitest
- Chapter 10: Integration Testing with Capybara and Cucumber
- Chapter 11: Testing for Security
- Chapter 12: Testing External Services
- Chapter 13: Testing JavaScript
- Chapter 14: Troubleshooting and Debugging
- Chapter 15: Running Tests Faster and Running Faster Tests
- Chapter 16: Testing Legacy Code
- Bibliography
Product information
- Title: Rails 4 Test Prescriptions
- Author(s):
- Release date: December 2014
- Publisher(s): Pragmatic Bookshelf
- ISBN: 9781941222195
You might also like
book
Rails 4 in Action
GET MORE WITH MANNING An eBook copy of the previous edition, Rails 3 in Action, is …
book
Rails 5 Test Prescriptions
Does your Rails code suffer from bloat, brittleness, or inaccuracy? Cure these problems with the regular …
book
RailsSpace: Building a Social Networking Website with Ruby on Rails™
Ruby on Rails is fast displacing PHP, ASP, and J2EE as the development framework of choice …
book
Business and Entrepreneurship in Saudi Arabia
An investor's crucial guide to the changing face of Saudi Arabian business Business and Entrepreneurship in …