Hello I've got somthing like this error in my rspec. Can you help me to fix
this:
I appreciate all those replies.

Failures:

  1) EmployeeMstsController PUT update with valid params updates the
requested e
mployee_mst
     Failure/Error: put :update, :id => employee_mst.id, :employee_mst =>
{'thes
e' => 'params'}
     ActionView::Template::Error:
       You have a nil object when you didn't expect it!
       You might have expected an instance of Array.
       The error occurred while evaluating nil.collect
     # ./app/views/employee_msts/_form.html.erb:62:in `block in
_app_views_emplo
yee_msts__form_html_erb__60652923_20894076__1043090194'
     # ./app/views/employee_msts/_form.html.erb:1:in
`_app_views_employee_msts__
form_html_erb__60652923_20894076__1043090194'
     # ./app/views/employee_msts/edit.html.erb:3:in
`_app_views_employee_msts_ed
it_html_erb___503015057_12218784_829847149'
     # ./app/controllers/employee_msts_controller.rb:80:in `block (2 levels)
in
update'
     # ./app/controllers/employee_msts_controller.rb:75:in `update'
     # ./spec/controllers/employee_msts_controller_spec.rb:119:in `block (4
leve
ls) in <top (required)>'

  2) EmployeeMstsController PUT update with invalid params assigns the
employee_
mst as @employee_mst
     Failure/Error: put :update, :id => employee_mst.id.to_s, :employee_mst
=> {
}
     ActionView::Template::Error:
       You have a nil object when you didn't expect it!
       You might have expected an instance of Array.
       The error occurred while evaluating nil.collect
     # ./app/views/employee_msts/_form.html.erb:62:in `block in
_app_views_emplo
yee_msts__form_html_erb__60652923_20894076__1043090194'
     # ./app/views/employee_msts/_form.html.erb:1:in
`_app_views_employee_msts__
form_html_erb__60652923_20894076__1043090194'
     # ./app/views/employee_msts/edit.html.erb:3:in
`_app_views_employee_msts_ed
it_html_erb___503015057_12218784_829847149'
     # ./app/controllers/employee_msts_controller.rb:80:in `block (2 levels)
in
update'
     # ./app/controllers/employee_msts_controller.rb:75:in `update'
     # ./spec/controllers/employee_msts_controller_spec.rb:140:in `block (4
leve
ls) in <top (required)>'

  3) EmployeeMstsController PUT update with invalid params re-renders the
'edit'
 template
     Failure/Error: put :update, :id => employee_mst.id.to_s, :employee_mst
=> {
}
     ActionView::Template::Error:
       You have a nil object when you didn't expect it!
       You might have expected an instance of Array.
       The error occurred while evaluating nil.collect
     # ./app/views/employee_msts/_form.html.erb:62:in `block in
_app_views_emplo
yee_msts__form_html_erb__60652923_20894076__1043090194'
     # ./app/views/employee_msts/_form.html.erb:1:in
`_app_views_employee_msts__
form_html_erb__60652923_20894076__1043090194'
     # ./app/views/employee_msts/edit.html.erb:3:in
`_app_views_employee_msts_ed
it_html_erb___503015057_12218784_829847149'
     # ./app/controllers/employee_msts_controller.rb:80:in `block (2 levels)
in
update'
     # ./app/controllers/employee_msts_controller.rb:75:in `update'
     # ./spec/controllers/employee_msts_controller_spec.rb:148:in `block (4
leve
ls) in <top (required)>'

Finished in 18.23 seconds
178 examples, 3 failures

Failed examples:

rspec ./spec/controllers/employee_msts_controller_spec.rb:112 #
EmployeeMstsCont
roller PUT update with valid params updates the requested employee_mst
rspec ./spec/controllers/employee_msts_controller_spec.rb:136 #
EmployeeMstsCont
roller PUT update with invalid params assigns the employee_mst as
@employee_mst
rspec ./spec/controllers/employee_msts_controller_spec.rb:144 #
EmployeeMstsCont
roller PUT update with invalid params re-renders the 'edit' template




--
View this message in context: 
http://ruby.11.x6.nabble.com/help-RSPEC-FAILURE-tp4992078.html
Sent from the rspec-users mailing list archive at Nabble.com.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to