Sha256: 7011eba388962246f25bfa3dff545080fc434a1823c4364c87333fe8bbdb7b2c
Contents?: true
Size: 468 Bytes
Versions: 3
Compression:
Stored size: 468 Bytes
Contents
require 'rails_helper' RSpec.describe AuthorsController do include_context 'books with authors' describe "GET #index" do it "assigns all authors as @authors" do get :index expect(assigns(:authors)).to eq([first_author, second_author]) end end describe "GET #show" do it "assigns the requested author as @author" do get :show, {:id => first_author.to_param} expect(assigns(:author)).to eq(first_author) end end end
Version data entries
3 entries across 3 versions & 1 rubygems