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.
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.
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.
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.
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.
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.
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.