require 'spec_helper' # Easy to test as well. describe ArticlesController do describe "index" do let!(:articles) { create_list :article, 3 } it "assigns all the articles" do get :index controller.articles.should == articles end end end