I can’t figure out why this is failing. It seems to have a hard time
assigning the @account. I have spent way too long trying to figure this
Thanks for any help.
NoMethodError in ‘StaffMembersController GET index should allow
You have a nil object when you didn’t expect it!
The error occurred while evaluating nil.staff_members
describe StaffMembersController do
describe “GET index” do
before :each do @account = mock_model(Account, :staff_members =>
# Authorization it "should allow anonymous users" do get :index response.should render_template(:index) end
class StaffMembersController < ApplicationController
@staff_members = @account.staff_members