Rspec — Use mocks in the proper way Setup Nobody likes when the controller contains too much business logic and becomes fat. Let's start with one simple controller: class ReservationsController < ActionController::Base
def create
book = Book.available.find_by(isbn: params[:isbn])
if…