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
- For the Best Reading Experience...
- Table of Contents
- Early praise for Rails 4 Test Prescriptions
- 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 14: Troubleshooting and Debugging
- Chapter 15: Running Tests Faster and Running Faster Tests
- Chapter 16: Testing Legacy Code
- Title: Rails 4 Test Prescriptions
- Release date: December 2014
- Publisher(s): Pragmatic Bookshelf
- ISBN: 9781941222195
You might also like
Expanded Edition (August 2018) Updated with Design Patterns episodes from the Clean Code series from Clean …
Python Crash Course, 2nd Edition
This is the second edition of the best selling Python book in the world. Python Crash …
51+ hours of video instruction. Overview The professional programmer’s Deitel® video guide to Python development with …
The Definitive Guide to Java Platform Best Practices–Updated for Java 7, 8, and 9 Java has …