O'Reilly logo

Rails 4 Test Prescriptions by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Infrastructure

First off, we’ll need a Rails application. We’ll be using Rails 4.1.7 and Ruby 2.1.4; use of Ruby 2.0–specific features will be minimal.

We’ll start by generating the Rails application from the command line:

 
% rails new gatherer

This will create the initial directory structure and code for a Rails application. It will also run bundle install to load initial gems. I assume that you are already familiar with Rails core concepts, I won’t spend a lot of time re-explaining them. If you are not familiar with Rails, Agile Web Development with Rails [RTH13] is still the gold standard for getting started.

We need to create our databases. For ease of setup and distribution we’ll stick to the Rails default, which is SQLite. (You’ll need ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required