[rspec-users] <help> renders new/edit user_mst form

David Chelimsky dchelimsky at gmail.com
Mon Jun 10 09:20:51 UTC 2013


On Mon, Jun 10, 2013 at 3:47 AM, Oliver Jesus <oliverjesus2008 at yahoo.com>wrote:

> Hello! I need a little help.
>
> If I run my rspec (rspec spec --backtrace) I've got error like this.
> Please help my. I greatly appreciated your answers.
>
> Finished in 14.39 seconds
> 173 examples, 6 failures, 5 pending
>
> Failed examples:
>
> rspec ./spec/views/department_msts/edit.html.erb_spec.rb:12 #
> department_msts/ed
> it.html.erb renders the edit department_mst form
> rspec ./spec/views/department_msts/new.html.erb_spec.rb:12 #
> department_msts/new
> .html.erb renders new department_mst form
> rspec ./spec/views/employee_msts/edit.html.erb_spec.rb:19 #
> employee_msts/edit.h
> tml.erb renders the edit employee_mst form
> rspec ./spec/views/employee_msts/new.html.erb_spec.rb:19 #
> employee_msts/new.htm
> l.erb renders new employee_mst form
> rspec ./spec/views/user_msts/edit.html.erb_spec.rb:17 #
> user_msts/edit.html.erb
> renders the edit user_mst form
> rspec ./spec/views/user_msts/new.html.erb_spec.rb:17 #
> user_msts/new.html.erb re
> nders new user_mst form
>

This is not the full backtrace, but I see you sent that in another email.
Even without the full backtrace, the following excerpt points you directly
to a specific problem spot:

61) user_msts/new.html.erb renders new user_mst form
     Failure/Error: render
     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/user_msts/_form.html.erb:44:in `block in
_app_views_user_msts

What is on line 44 of ./app/views/user_msts/_form.html.erb?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20130610/36120dcc/attachment-0001.html>


More information about the rspec-users mailing list