title: RSpec Error: Mock "Employee_1" received unexpected message:to_ary with(no args)
body: <p>My application has two models: User and Employee, and their relation is user has_many employees.</p>
  
  <p>As I trying to write a Rspec test case for the employee controller:</p>
  
  <pre><code>describe "GET 'edit'" do
    it "should get user/edit with log in" do
      log_in(@user)
      employee = mock_model(Employee, :id=&gt;1, :user_id=&gt;@user.id)
      get :edit, :id=&gt;employee
      response.should be_success
    end
  end
  </code></pre>
  
  <p>I got the result as:</p>
  
  <pre>
  ....F
  
  Failures:
  
    1) EmployeesController GET 'edit' should get user/edit with log in
       Failure/Error: get :edit, :id=>employee
         Mock "Employee_1" received unexpected message :to_ary with (no args)
       # C:in `find'
       # ./app/controllers/employees_controller.rb:41:in `edit'
       # ./spec/controllers/employees_controller_spec.rb:51:in `block (3 levels) in '
  
  Finished in 4.31 seconds
  5 examples, 1 failure
  </pre>
  
  <p>Can someone help me out with this please? Thanks</p>