search for: employee_report

Displaying 1 result from an estimated 1 matches for "employee_report".

2007 Oct 16
3
Controller iterating through returned records and appending to each
...t if I remove the "@employees.each { |e|....." line, the test still passes (which means the test isn''t accurate). I had to stub out "current_goal" and "current_goal=" because I kept getting "unexpected call" errors on each. Controller excerpt: def employee_report @employees = Employee.find_active_employees @employees.each { |e| e.current_goal = e.billablegoals.empty? ? "-" : e.billablegoals.select { |bg| bg.effective_date <= Date.today }[0].goal } end Spec: require File.dirname(__FILE__) + ''/../spec_helper.rb'' des...