Sha256: bd271bb7495ca46c2153aab897b0cd6e32566764f1844f3a1587cd6e2aad1f4c
Contents?: true
Size: 475 Bytes
Versions: 8
Compression:
Stored size: 475 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, params: { id: first_author.to_param } expect(assigns(:author)).to eq(first_author) end end end
Version data entries
8 entries across 8 versions & 1 rubygems