I have a ReportsController nested in ProjectsController using the #show method:
def show
Routes
resources :projects do resources :reports end
I need to check that the do_something method is called:
it 'calls do_something' do expect(controller).to receive(:do_something) project = create :project report = create :report, project: project get :show, params: {project_id: project.id, id: report.id} end
I placed binding.pry in the #show action, but this is not called. So what about my specification?
source share