Jump to ratings and reviews
Rate this book

Everyday Rails Testing with RSpec: A practical approach to test-driven development

Rate this book
Have you gotten your hands dirty with a Rails application or two, but lack reliable test coverage? Does your application testing consist of a series of browser clicks, hoping you cover everything? Or do you just cross your fingers and hope for the best that everything will just work?

Don't worry, everyone has been there at some point--and while testing and test-driven development are important aspects of Rails development, many tutorials gloss over these components. In Everyday Rails Testing with RSpec, you'll learn how to get past that hurdle, increase your code's trustworthiness, and save untold time in browser-based testing.

This book contains coverage of RSpec 3.6 and Rails 5.1, an all-new sample application, overhauled coverage of controller testing, expanded coverage of API testing, and more, to help you begin testing your Rails applications with confidence.

246 pages, Kindle Edition

Published November 27, 2017

16 people are currently reading
129 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
56 (36%)
4 stars
72 (46%)
3 stars
17 (10%)
2 stars
8 (5%)
1 star
2 (1%)
Displaying 1 - 12 of 12 reviews
Profile Image for Svetlio Blyahoff.
38 reviews4 followers
May 28, 2015
Great book that explains in a simple and comprehensive way the virtues of the different kinds of tests and when they are appropriate. It's a beginner level so... don't expect to write tests in a casual manner after it. It's a good starter though.

The only negative thing I could say... the grammar. It's not very clean. One of the things I got really bored about was the use of '-' between words, without leaving a space before and after. This way the words seemed as a two-word combination. It's really annoying.
Profile Image for Michael Koltsov.
110 reviews69 followers
July 19, 2018
I always had a strange perception towards writing tests in Ruby. Ruby is a language where making a change is so easy that you feel empowered to do more than you planned. And it forgives you a lot, allowing you to increase the amount of tech debt that you app accumulates during the development. And sometimes you realize that you can't progress anymore without sacrificing on the stability of your application.

And at this phase usually tests come into play to help you to gain control over your codebase and make it robust.

This book is a great introduction to start writing tests in Ruby. It teaches you concepts that are common, with very little emphasis on RSpec features. In my opinion the coverage of Rspec features is shallow, after reading the book I had to refer to the documentation a lot. Mocking frameworks are covered very poorly.

But as an introductory, especially if Ruby on Rails is your bread and butter this book is great as it's nicely written and doesn't get you bored which is very rare amongst the books about testing.

My score is 4/5
Profile Image for Felice Forby.
3 reviews
August 30, 2019
Good introduction to RSpec for beginners that works well as a primer for more in-depth resources on testing. A little outdated since RSpec was upgraded to version 3.8 after the book was written, but shouldn't be that much of a problem overall.
Profile Image for Mason Jones.
594 reviews15 followers
July 3, 2012
This book is still in-progress, but so far so good. I've worked with Rails testing using RSpec, so I'm not a real newcomer, but this was a good refresher with some nice pointers to ways of doing things that were new to me. For anyone just starting out with RSpec, this would be a very good book to begin with, I think.
Profile Image for Carlos.
2 reviews
October 7, 2014
Awesome book, very practical examples, definitely will use this as a guide for future RSpec testing.
Profile Image for Eric Brooke.
111 reviews18 followers
March 23, 2014
This was the a good walk through using Rails/RSpec combination its examples were least out of date of all the books I could find. It covers most of the MVC but misses out on Helper specs.
Profile Image for Gurkan Oluc.
8 reviews2 followers
January 28, 2015
Good book in general. There is just one thing I don't like, it spends so much time on controller testing which is not the way I test my Rails controllers.
Profile Image for Ben Serviss.
Author 1 book6 followers
April 29, 2015
Handy info and best practices for TDD, plus it comes with a git repo of examples you can do as you read along!
Displaying 1 - 12 of 12 reviews

Can't find what you're looking for?

Get help and learn more about the design.