Ruby on Rails testing with RSpec. Installing RSpec. Rails RSpec Tutorial.

RSpec Tutorial

  • Testimonial

    Thanks so much for this. There are so many Rails tutorials for absolute beginners, and lots of stuff that assumes expert knowledge, but not much, besides practice, to span the gap. Rick Quantz, HackerNews, 13 May 2011

  • Testimonial

    I will be starting a new job here in SF, due in no small part to what I've learned here from the RailsApp Project. Joseph May, 23 Dec 2013

  • Testimonial

    I would like to say thank you for such a precise guide. It helped me understand how things work a great deal quicker than all of the bits and pieces I was reading around the web. Justin Booth

  • Testimonial

    @danielkehoe is somewhat of a hero with the stuff he puts on @github Warwick Poole, Twitter, 2 July 2011

  • Testimonial

    Crazy Deep! Peter Cooper, Ruby Weekly, 19 May 2011


RailsApps Quickstart Guide

Rails Testing with RSpec

What's Here:

  • how to install RSpec
  • example tests
  • concepts and terminology
Table of Contents
  • Installation
  • Run RSpec
  • Concepts
  • Feature Tests
  • Unit Tests
  • Model Tests
  • Other Tests
  • Testing Email
  • Sample Data
  • FactoryGirl
  • Resources for RSpec
  • Words of Encouragement
Is It for You?

RSpec is the most popular test framework for Rails. This guide shows how to set up RSpec and explains how to write simple tests. It provides an introduction to basic concepts and recommended practices. RSpec is complex and there are very few guides for beginners, so you will find this guide helpful if you want to get started with RSpec.

From the RailsApps Project

Our tutorials are acclaimed as comprehensive and deep, and easy to follow for beginners. Whether you are new to testing, or looking to fill gaps in your knowledge, our RSpec tutorial is a great place to get started.

  • INDIVIDUAL
  • $19
  • Per Month
  • RSpec Quickstart Guide
    plus all other tutorials
  • With two full-length books:
    Learn Ruby on Rails
    Rails and Bootstrap
  • Support the project for updates and more guides
  • SUBSCRIBE
  • ORGANIZATION
  • $349
  • Per Year
  • All Tutorials
  • Books Included
  • For Your Entire Team
  • Invite Multiple Users
  • SUBSCRIBE

Rails 4.2 Examples

Our example applications show how to use RSpec, Bootstrap or Foundation, Devise, Pundit, and OmniAuth. All are open source, thanks to support from our subscribers.

Composer

Use our Rails Composer tool to generate a starter app with a choice of popular gems. Save time and effort when you start any project. Again, open source, thanks to our subscribers.

Books and Guides

Our books and guides are available exclusively to paid subscribers. Your monthly subscription provides financial support for the project. In exchange, we give you in-depth documentation.

Tools

Tools

In addition to the Rails Composer tool, your subscription supports development and maintenance of the Rails Layout gem and the RailsAppsComposer gem.

The Book

The Books

Learn Ruby on Rails is the acclaimed book for beginners. Available here, with a subscription, or on Amazon.

Support the project. Sign up now!

Your participation insures the survival of a project that benefits Rails developers all over the world. Plus, you get exclusive access to books and tutorials so you can build and learn.

What people are saying...


comments powered by Disqus