Real emailing works but the test fails. Not sure whats going wrong. Does anyone know what could be the problem?
TasksController POST create with valid params emails the collaborators (FAILED - 1)
it 'emails the collaborators' do
post :create, { :task => valid_attributes }
Emailer.should_receive(:send_email).with(user, :new_task, assigns(:task).project)
end
Failures:
1) TasksController POST create with valid params emails the collaborators
Failure/Error: Emailer.should_receive(:send_email).with(user, :new_task, assigns(:task).project)
().send_email(#, :new_task, 'blah')
expected: 1 time
received: 0 times
I have the following gems:
rails (3.2.7)
rspec-rails (2.11.4)
email_spec (1.2.1)