Everyday Rails

Everyday Rails Testing with RSpec: Get advance access to my new book now

By Aaron Sumner, May 07, 2012. File under: , .

book cover When I concluded my series on learning RSpec a couple of weeks ago, I mentioned I’ve been working on an ebook version of the series with additional content and a complete code sample. I’m happy to announce that my first book, Everyday Rails Testing with RSpec: A Practical Approach to Test-driven Development is now available for advance access through Leanpub!

What do I mean by advance access? I mean it’s not done yet, but I wanted to go ahead and get the book out there for people to start reading. (If you’ve ever purchased a beta book from Pragmatic Programmers you know what I’m talking about.) I’ve got updated versions of the original RSpec articles from this blog in place, along with a few other pieces. The remainder will be in place within the next few weeks, with some editing to be done after that along with the completed sample code. In addition, I’ll keep code samples current through Rails 4.0.

Here’s a rundown of what’s done and what I’m working on:

  1. Introduction: available now
  2. Setting up RSpec: available now
  3. Model specs: available now
  4. More on factories (exclusive): in progress
  5. Controller specs: available now
  6. Request specs: available now
  7. Testing logins (exclusive): in progress
  8. Improving specs (exclusive): in progress
  9. Toward test-driven development (exclusive): in progress
  10. Parting advice (updated content): available now
  11. More testing resources for Rails (exclusive): available now

I may throw in another chapter or two before it’s done. When finished the book will be 100-ish pages and, as I mentioned, include a complete, downloadable Rails application with sample tests in RSpec.

I should mention that this book isn’t your typical, type-along tutorial. We’re not going to build an application together–I’m going to show you the process I went through as I made RSpec part of my development toolkit, and give you techniques and patterns to follow when testing your own applications. I’ll also take you through a lot of foundational stuff early on that will get cleaned up later. If you’re familiar with Zed Shaw’s Learn Code the Hard Way series you may get the general idea–it’s not an apples-to-apples comparison, but his technique did inspire my thinking behind this series. So did the Railscasts episode How I Test.

Finally, I’m not giving this book away for free–it’s taken a lot of time to conceptualize and write, and I’ve been working hard to make it worth a little bit of your money. That said, I’m keeping it reasonably priced, especially for those of you gracious enough to buy an early copy. And it’s DRM-free. You can get your copy today for only $12 US. I’ll keep it at $9 for the Rails 3 releases, and reserve the right to raise the price later.

If you’re not ready to buy right away, please sign up for the mailing list to keep current on the book’s status. I won’t use the list to spam you–just to keep you notified as I progress through the remainder of the book.

Thanks very much for keeping up with Everyday Rails over the last couple of years. I hope you’ll check out Everyday Rails Testing with RSpec and give me your feedback.

Discussion

Follow along on on Mastodon, Facebook, or Bluesky to keep up-to-date with my latest posts. Better yet, subscribe to my newsletter for updates from Everyday Rails, book picks, and other thoughts and ideas that didn't quite fit here.
Buy Me A Coffee

Test with confidence!

If you liked my series on practical advice for adding reliable tests to your Rails apps, check out the expanded ebook version. Lots of additional, exclusive content and a complete sample Rails application.

Newsletter

Ruby on Rails news and tips, and other ideas and surprises from Aaron at Everyday Rails. Delivered to your inbox on no particular set schedule.