<help> renders new/edit user_mst form

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

<help> renders new/edit user_mst form

oliver
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

_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

David Chelimsky-2
On Mon, Jun 10, 2013 at 3:47 AM, Oliver Jesus <[hidden email]> 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?

_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

oliver
In reply to this post by oliver
<%= f.select :group_name, options_for_select(@group_mst.collect{|x| [x.group_name]}), {:multiple => :multiple} %>

that is on the line 44.
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

oliver
In reply to this post by David Chelimsky-2
<%= f.select :group_name, options_for_select(@group_mst.collect{|x|
[x.group_name]}), {:multiple => :multiple} %>

that is on the line 44.



--
View this message in context: http://ruby.11.x6.nabble.com/help-renders-new-edit-user-mst-form-tp4991623p4991630.html
Sent from the rspec-users mailing list archive at Nabble.com.
_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

David Chelimsky-2
In reply to this post by oliver
On Mon, Jun 10, 2013 at 4:25 AM, oliver <[hidden email]> wrote:
<%= f.select :group_name, options_for_select(@group_mst.collect{|x| [x.group_name]}), {:multiple => :multiple} %>

that is on the line 44.

And the error raised on that line says "The error occurred while evaluating nil.collect". The only thing receiving "collect" on that line is @group_mst, so the spec has to do something to assign an Enumerable to @group_mst before calling render in the spec. Is there a line in the controller that assigns something to @group_mst? If so, what's on that line?



_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

oliver


--- On Mon, 6/10/13, David Chelimsky-2 [via Ruby] <[hidden email]> wrote:

From: David Chelimsky-2 [via Ruby] <[hidden email]>
Subject: Re: <help> renders new/edit user_mst form
To: "oliver" <[hidden email]>
Date: Monday, June 10, 2013, 9:36 AM

On Mon, Jun 10, 2013 at 4:25 AM, oliver <[hidden email]> wrote:
<%= f.select :group_name, options_for_select(@group_mst.collect{|x| [x.group_name]}), {:multiple => :multiple} %>

that is on the line 44.

And the error raised on that line says "The error occurred while evaluating nil.collect". The only thing receiving "collect" on that line is @group_mst, so the spec has to do something to assign an Enumerable to @group_mst before calling render in the spec. Is there a line in the controller that assigns something to @group_mst? If so, what's on that line?



_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users


If you reply to this email, your message will be added to the discussion below:
http://ruby.11.x6.nabble.com/help-renders-new-edit-user-mst-form-tp4991623p4991631.html
To unsubscribe from <help> renders new/edit user_mst form, click here.
NAML



 def new 
    @user_mst = UserMst.new 
    @group_mst = GroupMst.all 

    respond_to do |format| 
      format.html # new.html.erb 
      format.xml  { render :xml => @user_mst } 
    end 
  end 

  def edit 
    @user_mst = UserMst.find(params[:id]) 
        @group_mst = GroupMst.all 
  end 

 def create 
    @user_mst = UserMst.new(params[:user_mst]) 
        @group_mst = GroupMst.all 

    respond_to do |format| 
      if @user_mst.save 
        format.html { redirect_to(@user_mst, :notice => 'User mst was successfully created.') } 
        format.xml  { render :xml => @user_mst, :status => :created, :location => @user_mst } 
      else 
        format.html { render :action => "new" } 
        format.xml  { render :xml => @user_mst.errors, :status => :unprocessable_entity } 
      end 
    end 
  end 

Those are the lines I include @group_mst. 
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

oliver
In reply to this post by David Chelimsky-2
def new
    @user_mst = UserMst.new
    @group_mst = GroupMst.all

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @user_mst }
    end
  end

  def edit
    @user_mst = UserMst.find(params[:id])
        @group_mst = GroupMst.all
  end

 def create
    @user_mst = UserMst.new(params[:user_mst])
        @group_mst = GroupMst.all

    respond_to do |format|
      if @user_mst.save
        format.html { redirect_to(@user_mst, :notice => 'User mst was successfully created.') }
        format.xml  { render :xml => @user_mst, :status => :created, :location => @user_mst }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @user_mst.errors, :status => :unprocessable_entity }
      end
    end
  end

Those are the lines I include @group_mst.
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

David Chelimsky-2
In reply to this post by David Chelimsky-2
On Mon, Jun 10, 2013 at 4:39 AM, oliver <[hidden email]> wrote:
  def new
    @user_mst = UserMst.new
    @group_mst = GroupMst.all

Under normal circumstances, this line ^^ would assign @group_mst an empty collection, not nil, so something is wrong with the way things are set up/configured.

What happens if you stub GroupMst.all in the spec:

    GroupMst.stub(:all => [])

Please try that and then run just one example like this:

    rspec spec/views/user_msts/new.html.erb_spec.rb:18 --backtrace

And then post the complete output.


 

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @user_mst }
    end
  end

Those are the lines I include @group_mst.



_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

oliver


--- On Mon, 6/10/13, David Chelimsky-2 [via Ruby] <[hidden email]> wrote:

From: David Chelimsky-2 [via Ruby] <[hidden email]>
Subject: Re: <help> renders new/edit user_mst form
To: "oliver" <[hidden email]>
Date: Monday, June 10, 2013, 9:57 AM

On Mon, Jun 10, 2013 at 4:39 AM, oliver <[hidden email]> wrote:
  def new
    @user_mst = UserMst.new
    @group_mst = GroupMst.all

Under normal circumstances, this line ^^ would assign @group_mst an empty collection, not nil, so something is wrong with the way things are set up/configured.

What happens if you stub GroupMst.all in the spec:

    GroupMst.stub(:all => [])

Please try that and then run just one example like this:

    rspec spec/views/user_msts/new.html.erb_spec.rb:18 --backtrace

And then post the complete output.


 

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @user_mst }
    end
  end

Those are the lines I include @group_mst.



_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users


If you reply to this email, your message will be added to the discussion below:
http://ruby.11.x6.nabble.com/help-renders-new-edit-user-mst-form-tp4991623p4991635.html
To unsubscribe from <help> renders new/edit user_mst form, click here.
NAML



late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels) in <t
op (required)>'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

Finished in 0.67188 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/views/user_msts/new.html.erb_spec.rb:19 # user_msts/new.html.erb re
nders new user_mst form

That is the output.
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

David Chelimsky-2



On Mon, Jun 10, 2013 at 5:09 AM, oliver <[hidden email]> wrote:


--- On Mon, 6/10/13, David Chelimsky-2 [via Ruby] <[hidden email]> wrote:

From: David Chelimsky-2 [via Ruby] <[hidden email]>
Subject: Re: <help> renders new/edit user_mst form
To: "oliver" <[hidden email]>
Date: Monday, June 10, 2013, 9:57 AM

On Mon, Jun 10, 2013 at 4:39 AM, oliver <[hidden email]> wrote:
  def new
    @user_mst = UserMst.new
    @group_mst = GroupMst.all

Under normal circumstances, this line ^^ would assign @group_mst an empty collection, not nil, so something is wrong with the way things are set up/configured.

What happens if you stub GroupMst.all in the spec:

    GroupMst.stub(:all => [])

Please try that and then run just one example like this:

    rspec spec/views/user_msts/new.html.erb_spec.rb:18 --backtrace

And then post the complete output.


 

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @user_mst }
    end
  end

Those are the lines I include @group_mst.



_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users


If you reply to this email, your message will be added to the discussion below:
http://ruby.11.x6.nabble.com/help-renders-new-edit-user-mst-form-tp4991623p4991635.html
To unsubscribe from <help> renders new/edit user_mst form, click here.
NAML



late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels) in <t
op (required)>'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

Finished in 0.67188 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/views/user_msts/new.html.erb_spec.rb:19 # user_msts/new.html.erb re
nders new user_mst form

That is the output.

It looks like it got cut off at the beginning. Can you paste the full output starting from the command?

_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

oliver
     # ./app/views/employee_msts/new.html.erb:3:in `_app_views_employee_msts_new
_html_erb__385952098_22995768_655956278'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/employee_msts/new.html.erb_spec.rb:20:in `block (2 levels) i
n <top (required)>'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

  5) user_msts/edit.html.erb renders the edit 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
__form_html_erb__114702870_19515960_961344552'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in `_app_views_user_msts__form_htm
l_erb__114702870_19515960_961344552'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/edit.html.erb:3:in `_app_views_user_msts_edit_html_
erb__181415030_23861124_655956278'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/edit.html.erb_spec.rb:18:in `block (2 levels) in <
top (required)>'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

  6) user_msts/new.html.erb renders new user_mst form
     Failure/Error: render
     ActionView::Template::Error:
       undefined method `group_name' for [:all, []]:Array
     # ./app/views/user_msts/_form.html.erb:44:in `block (2 levels) in _app_view
s_user_msts__form_html_erb__114702870_19515960_961344552'
     # ./app/views/user_msts/_form.html.erb:44:in `each'
     # ./app/views/user_msts/_form.html.erb:44:in `collect'
     # ./app/views/user_msts/_form.html.erb:44:in `block in _app_views_user_msts
__form_html_erb__114702870_19515960_961344552'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in `_app_views_user_msts__form_htm
l_erb__114702870_19515960_961344552'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/new.html.erb:3:in `_app_views_user_msts_new_html_er
b___24760265_22511868_655956278'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels) in <t
op (required)>'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

Finished in 15 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:19 # user_msts/new.html.erb re
nders new user_mst form


This is the all output.
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

oliver
This post has NOT been accepted by the mailing list yet.
In reply to this post by David Chelimsky-2


--- On Mon, 6/10/13, David Chelimsky-2 [via Ruby] <[hidden email]> wrote:

From: David Chelimsky-2 [via Ruby] <[hidden email]>
Subject: Re: <help> renders new/edit user_mst form
To: "oliver" <[hidden email]>
Date: Monday, June 10, 2013, 10:12 AM




On Mon, Jun 10, 2013 at 5:09 AM, oliver <[hidden email]> wrote:


--- On Mon, 6/10/13, David Chelimsky-2 [via Ruby] <[hidden email]> wrote:

From: David Chelimsky-2 [via Ruby] <[hidden email]>
Subject: Re: <help> renders new/edit user_mst form
To: "oliver" <[hidden email]>
Date: Monday, June 10, 2013, 9:57 AM

On Mon, Jun 10, 2013 at 4:39 AM, oliver <[hidden email]> wrote:
  def new
    @user_mst = UserMst.new
    @group_mst = GroupMst.all

Under normal circumstances, this line ^^ would assign @group_mst an empty collection, not nil, so something is wrong with the way things are set up/configured.

What happens if you stub GroupMst.all in the spec:

    GroupMst.stub(:all => [])

Please try that and then run just one example like this:

    rspec spec/views/user_msts/new.html.erb_spec.rb:18 --backtrace

And then post the complete output.


 

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @user_mst }
    end
  end

Those are the lines I include @group_mst.



_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users


If you reply to this email, your message will be added to the discussion below:
http://ruby.11.x6.nabble.com/help-renders-new-edit-user-mst-form-tp4991623p4991635.html
To unsubscribe from <help> renders new/edit user_mst form, click here.
NAML



late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels) in <t
op (required)>'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

Finished in 0.67188 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/views/user_msts/new.html.erb_spec.rb:19 # user_msts/new.html.erb re
nders new user_mst form

That is the output.

It looks like it got cut off at the beginning. Can you paste the full output starting from the command?

_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users


If you reply to this email, your message will be added to the discussion below:
http://ruby.11.x6.nabble.com/help-renders-new-edit-user-mst-form-tp4991623p4991638.html
To unsubscribe from <help> renders new/edit user_mst form, click here.
NAML



  # ./app/views/employee_msts/new.html.erb:3:in `_app_views_employee_msts_new 
_html_erb__385952098_22995768_655956278' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp 
late.rb:135:in `block in render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `block in instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications/instrumenter.rb:21:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp 
late.rb:127:in `render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:59:in `block in _render_template' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `block in instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications/instrumenter.rb:21:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:56:in `_render_template' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:26:in `render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test 
_case.rb:107:in `render' 
     # ./spec/views/employee_msts/new.html.erb_spec.rb:20:in `block (2 levels) i 
n <top (required)>' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:48:in `instance_eval' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:48:in `block in run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:107:in `with_around_hooks' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:45:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:294:in `block in run_examples' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:290:in `map' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:290:in `run_examples' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:262:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:24:in `block (2 levels) in run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:24:in `map' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:24:in `block in run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor 
ter.rb:12:in `report' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:21:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne 
r.rb:80:in `run_in_process' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne 
r.rb:69:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne 
r.rb:11:in `block in autorun' 

  5) user_msts/edit.html.erb renders the edit 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 
__form_html_erb__114702870_19515960_961344552' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help 
ers/capture_helper.rb:40:in `block in capture' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help 
ers/capture_helper.rb:172:in `with_output_buffer' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help 
ers/capture_helper.rb:40:in `capture' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help 
ers/form_helper.rb:545:in `fields_for' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help 
ers/form_helper.rb:320:in `form_for' 
     # ./app/views/user_msts/_form.html.erb:1:in `_app_views_user_msts__form_htm 
l_erb__114702870_19515960_961344552' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp 
late.rb:135:in `block in render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `block in instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications/instrumenter.rb:21:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp 
late.rb:127:in `render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/partials.rb:333:in `render_partial' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/partials.rb:262:in `block in render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `block in instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications/instrumenter.rb:21:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/partials.rb:260:in `render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/partials.rb:378:in `_render_partial' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test 
_case.rb:149:in `_render_partial' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:31:in `render' 
     # ./app/views/user_msts/edit.html.erb:3:in `_app_views_user_msts_edit_html_ 
erb__181415030_23861124_655956278' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp 
late.rb:135:in `block in render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `block in instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications/instrumenter.rb:21:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp 
late.rb:127:in `render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:59:in `block in _render_template' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `block in instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications/instrumenter.rb:21:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:56:in `_render_template' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:26:in `render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test 
_case.rb:107:in `render' 
     # ./spec/views/user_msts/edit.html.erb_spec.rb:18:in `block (2 levels) in < 
top (required)>' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:48:in `instance_eval' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:48:in `block in run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:107:in `with_around_hooks' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:45:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:294:in `block in run_examples' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:290:in `map' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:290:in `run_examples' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:262:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:24:in `block (2 levels) in run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:24:in `map' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:24:in `block in run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor 
ter.rb:12:in `report' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:21:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne 
r.rb:80:in `run_in_process' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne 
r.rb:69:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne 
r.rb:11:in `block in autorun' 

  6) user_msts/new.html.erb renders new user_mst form 
     Failure/Error: render 
     ActionView::Template::Error: 
       undefined method `group_name' for [:all, []]:Array 
     # ./app/views/user_msts/_form.html.erb:44:in `block (2 levels) in _app_view 
s_user_msts__form_html_erb__114702870_19515960_961344552' 
     # ./app/views/user_msts/_form.html.erb:44:in `each' 
     # ./app/views/user_msts/_form.html.erb:44:in `collect' 
     # ./app/views/user_msts/_form.html.erb:44:in `block in _app_views_user_msts 
__form_html_erb__114702870_19515960_961344552' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help 
ers/capture_helper.rb:40:in `block in capture' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help 
ers/capture_helper.rb:172:in `with_output_buffer' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help 
ers/capture_helper.rb:40:in `capture' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help 
ers/form_helper.rb:545:in `fields_for' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help 
ers/form_helper.rb:320:in `form_for' 
     # ./app/views/user_msts/_form.html.erb:1:in `_app_views_user_msts__form_htm 
l_erb__114702870_19515960_961344552' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp 
late.rb:135:in `block in render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `block in instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications/instrumenter.rb:21:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp 
late.rb:127:in `render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/partials.rb:333:in `render_partial' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/partials.rb:262:in `block in render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `block in instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications/instrumenter.rb:21:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/partials.rb:260:in `render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/partials.rb:378:in `_render_partial' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test 
_case.rb:149:in `_render_partial' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:31:in `render' 
     # ./app/views/user_msts/new.html.erb:3:in `_app_views_user_msts_new_html_er 
b___24760265_22511868_655956278' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp 
late.rb:135:in `block in render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `block in instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications/instrumenter.rb:21:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp 
late.rb:127:in `render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:59:in `block in _render_template' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `block in instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications/instrumenter.rb:21:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor 
t/notifications.rb:52:in `instrument' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:56:in `_render_template' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend 
er/rendering.rb:26:in `render' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test 
_case.rb:107:in `render' 
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels) in <t 
op (required)>' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:48:in `instance_eval' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:48:in `block in run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:107:in `with_around_hooks' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le.rb:45:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:294:in `block in run_examples' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:290:in `map' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:290:in `run_examples' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp 
le_group.rb:262:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:24:in `block (2 levels) in run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:24:in `map' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:24:in `block in run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor 
ter.rb:12:in `report' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma 
nd_line.rb:21:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne 
r.rb:80:in `run_in_process' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne 
r.rb:69:in `run' 
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne 
r.rb:11:in `block in autorun' 

Finished in 15 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:19 # user_msts/new.html.erb re 
nders new user_mst form 


This is the all output.
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

David Chelimsky-2
In reply to this post by oliver
On Mon, Jun 10, 2013 at 5:18 AM, oliver <[hidden email]> wrote:
     # ./app/views/employee_msts/new.html.erb:3:in
`_app_views_employee_msts_new
_html_erb__385952098_22995768_655956278'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/employee_msts/new.html.erb_spec.rb:20:in `block (2
levels) i
n <top (required)>'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

  5) user_msts/edit.html.erb renders the edit 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
__form_html_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in
`_app_views_user_msts__form_htm
l_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/edit.html.erb:3:in
`_app_views_user_msts_edit_html_
erb__181415030_23861124_655956278'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/edit.html.erb_spec.rb:18:in `block (2 levels)
in <
top (required)>'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

  6) user_msts/new.html.erb renders new user_mst form
     Failure/Error: render
     ActionView::Template::Error:
       undefined method `group_name' for [:all, []]:Array
     # ./app/views/user_msts/_form.html.erb:44:in `block (2 levels) in
_app_view
s_user_msts__form_html_erb__114702870_19515960_961344552'
     # ./app/views/user_msts/_form.html.erb:44:in `each'
     # ./app/views/user_msts/_form.html.erb:44:in `collect'
     # ./app/views/user_msts/_form.html.erb:44:in `block in
_app_views_user_msts
__form_html_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in
`_app_views_user_msts__form_htm
l_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/new.html.erb:3:in
`_app_views_user_msts_new_html_er
b___24760265_22511868_655956278'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels)
in <t
op (required)>'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

Finished in 15 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:19 #
user_msts/new.html.erb re
nders new user_mst form


This is the all output.

That's not what I asked you for. Please run the single example and post the full output from the command: rspec ./spec/views/employee_msts/new.html.erb_spec.rb:19

I'm asking for a single example so we can focus on one thing. Hopefully once that's passing you'll be able to apply the solution to the other examples.
    

_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

oliver
This post has NOT been accepted by the mailing list yet.


--- On Mon, 6/10/13, David Chelimsky-2 [via Ruby] <[hidden email]> wrote:

From: David Chelimsky-2 [via Ruby] <[hidden email]>
Subject: Re: <help> renders new/edit user_mst form
To: "oliver" <[hidden email]>
Date: Monday, June 10, 2013, 10:42 AM

On Mon, Jun 10, 2013 at 5:18 AM, oliver <[hidden email]> wrote:
     # ./app/views/employee_msts/new.html.erb:3:in
`_app_views_employee_msts_new
_html_erb__385952098_22995768_655956278'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/employee_msts/new.html.erb_spec.rb:20:in `block (2
levels) i
n <top (required)>'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

  5) user_msts/edit.html.erb renders the edit 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
__form_html_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in
`_app_views_user_msts__form_htm
l_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/edit.html.erb:3:in
`_app_views_user_msts_edit_html_
erb__181415030_23861124_655956278'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/edit.html.erb_spec.rb:18:in `block (2 levels)
in <
top (required)>'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

  6) user_msts/new.html.erb renders new user_mst form
     Failure/Error: render
     ActionView::Template::Error:
       undefined method `group_name' for [:all, []]:Array
     # ./app/views/user_msts/_form.html.erb:44:in `block (2 levels) in
_app_view
s_user_msts__form_html_erb__114702870_19515960_961344552'
     # ./app/views/user_msts/_form.html.erb:44:in `each'
     # ./app/views/user_msts/_form.html.erb:44:in `collect'
     # ./app/views/user_msts/_form.html.erb:44:in `block in
_app_views_user_msts
__form_html_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in
`_app_views_user_msts__form_htm
l_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/new.html.erb:3:in
`_app_views_user_msts_new_html_er
b___24760265_22511868_655956278'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels)
in <t
op (required)>'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

Finished in 15 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:19 #
user_msts/new.html.erb re
nders new user_mst form


This is the all output.

That's not what I asked you for. Please run the single example and post the full output from the command: rspec ./spec/views/employee_msts/new.html.erb_spec.rb:19

I'm asking for a single example so we can focus on one thing. Hopefully once that's passing you'll be able to apply the solution to the other examples.
    

_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users


If you reply to this email, your message will be added to the discussion below:
http://ruby.11.x6.nabble.com/help-renders-new-edit-user-mst-form-tp4991623p4991641.html
To unsubscribe from <help> renders new/edit user_mst form, click here.
NAML


C:\Documents and Settings\Oliver\Desktop\ams>rspec spec/views/user_msts/new.html
.erb_spec.rb:19 --backtrace
Run filtered including {:line_number=>19}
F

Failures:

  1) user_msts/new.html.erb renders new user_mst form
     Failure/Error: # Run the generator again with the --webrat flag if you want
 to use webrat matchers
     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
__form_html_erb__212366709_16540380_1066166632'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in `_app_views_user_msts__form_htm
l_erb__212366709_16540380_1066166632'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/new.html.erb:3:in `_app_views_user_msts_new_html_er
b__441458415_16571532__735039642'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels) in <t
op (required)>'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

Finished in 0.67188 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/views/user_msts/new.html.erb_spec.rb:19 # user_msts/new.html.erb re
nders new user_mst form


Here it is.
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

oliver
In reply to this post by David Chelimsky-2
C:\Documents and Settings\Oliver\Desktop\ams>rspec spec/views/user_msts/new.html
.erb_spec.rb:19 --backtrace
Run filtered including {:line_number=>19}
F

Failures:

  1) user_msts/new.html.erb renders new user_mst form
     Failure/Error: # Run the generator again with the --webrat flag if you want
 to use webrat matchers
     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
__form_html_erb__212366709_16540380_1066166632'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in `_app_views_user_msts__form_htm
l_erb__212366709_16540380_1066166632'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/new.html.erb:3:in `_app_views_user_msts_new_html_er
b__441458415_16571532__735039642'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels) in <t
op (required)>'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

Finished in 0.67188 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/views/user_msts/new.html.erb_spec.rb:19 # user_msts/new.html.erb re
nders new user_mst form

Here it is.
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

oliver
This post has NOT been accepted by the mailing list yet.
In reply to this post by David Chelimsky-2


--- On Mon, 6/10/13, David Chelimsky-2 [via Ruby] <[hidden email]> wrote:

From: David Chelimsky-2 [via Ruby] <[hidden email]>
Subject: Re: <help> renders new/edit user_mst form
To: "oliver" <[hidden email]>
Date: Monday, June 10, 2013, 10:42 AM

On Mon, Jun 10, 2013 at 5:18 AM, oliver <[hidden email]> wrote:
     # ./app/views/employee_msts/new.html.erb:3:in
`_app_views_employee_msts_new
_html_erb__385952098_22995768_655956278'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/employee_msts/new.html.erb_spec.rb:20:in `block (2
levels) i
n <top (required)>'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

  5) user_msts/edit.html.erb renders the edit 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
__form_html_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in
`_app_views_user_msts__form_htm
l_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/edit.html.erb:3:in
`_app_views_user_msts_edit_html_
erb__181415030_23861124_655956278'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/edit.html.erb_spec.rb:18:in `block (2 levels)
in <
top (required)>'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

  6) user_msts/new.html.erb renders new user_mst form
     Failure/Error: render
     ActionView::Template::Error:
       undefined method `group_name' for [:all, []]:Array
     # ./app/views/user_msts/_form.html.erb:44:in `block (2 levels) in
_app_view
s_user_msts__form_html_erb__114702870_19515960_961344552'
     # ./app/views/user_msts/_form.html.erb:44:in `each'
     # ./app/views/user_msts/_form.html.erb:44:in `collect'
     # ./app/views/user_msts/_form.html.erb:44:in `block in
_app_views_user_msts
__form_html_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in
`_app_views_user_msts__form_htm
l_erb__114702870_19515960_961344552'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/new.html.erb:3:in
`_app_views_user_msts_new_html_er
b___24760265_22511868_655956278'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels)
in <t
op (required)>'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

Finished in 15 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:19 #
user_msts/new.html.erb re
nders new user_mst form


This is the all output.

That's not what I asked you for. Please run the single example and post the full output from the command: rspec ./spec/views/employee_msts/new.html.erb_spec.rb:19

I'm asking for a single example so we can focus on one thing. Hopefully once that's passing you'll be able to apply the solution to the other examples.
    

_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users


If you reply to this email, your message will be added to the discussion below:
http://ruby.11.x6.nabble.com/help-renders-new-edit-user-mst-form-tp4991623p4991641.html
To unsubscribe from <help> renders new/edit user_mst form, click here.
NAML


require 'spec_helper'

describe "user_msts/new.html.erb" do
  before(:each) do
    assign(:user_mst, stub_model(UserMst,
      :username => "MyString",
      :password => "MyString",
      :confirm_password => "MyString",
      :first_name => "MyString",
      :middle_name => "MyString",
      :last_name => "MyString",
      :group_name => "MyString",
      :position => "MyString"
    ).as_new_record)
  end

  it "renders new user_mst form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form", :action => user_msts_path, :method => "post" do
      assert_select "input#user_mst_username", :name => "user_mst[username]"
      assert_select "input#user_mst_password", :name => "user_mst[password]"
      assert_select "input#user_mst_confirm_password", :name => "user_mst[confirm_password]"
      assert_select "input#user_mst_first_name", :name => "user_mst[first_name]"
      assert_select "input#user_mst_middle_name", :name => "user_mst[middle_name]"
      assert_select "input#user_mst_last_name", :name => "user_mst[last_name]"
      assert_select "input#user_mst_group_name", :name => "user_mst[group_name]"
      assert_select "input#user_mst_position", :name => "user_mst[position]"
    end
  end 
end


This is my whole code in new.html.erb .  I think there is something wrong with these.
Reply | Threaded
Open this post in threaded view
|

Re: <help> renders new/edit user_mst form

David Chelimsky-2
In reply to this post by oliver
On Mon, Jun 10, 2013 at 5:53 AM, oliver <[hidden email]> wrote:
C:\Documents and Settings\Oliver\Desktop\ams>rspec spec/views/user_msts/new.html
.erb_spec.rb:19 --backtrace
Run filtered including {:line_number=>19}
F

Failures:

  1) user_msts/new.html.erb renders new user_mst form
     Failure/Error: # Run the generator again with the --webrat flag if you want
 to use webrat matchers
     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
__form_html_erb__212366709_16540380_1066166632'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `block in capture'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:172:in `with_output_buffer'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/capture_helper.rb:40:in `capture'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:545:in `fields_for'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/help
ers/form_helper.rb:320:in `form_for'
     # ./app/views/user_msts/_form.html.erb:1:in `_app_views_user_msts__form_htm
l_erb__212366709_16540380_1066166632'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:333:in `render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:262:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:260:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/partials.rb:378:in `_render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:149:in `_render_partial'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:31:in `render'
     # ./app/views/user_msts/new.html.erb:3:in `_app_views_user_msts_new_html_er
b__441458415_16571532__735039642'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:135:in `block in render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/temp
late.rb:127:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:59:in `block in _render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `block in instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications/instrumenter.rb:21:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_suppor
t/notifications.rb:52:in `instrument'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:56:in `_render_template'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/rend
er/rendering.rb:26:in `render'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/test
_case.rb:107:in `render'
     # ./spec/views/user_msts/new.html.erb_spec.rb:20:in `block (2 levels) in <t
op (required)>'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `instance_eval'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:48:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:107:in `with_around_hooks'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le.rb:45:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:294:in `block in run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:290:in `run_examples'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/examp
le_group.rb:262:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block (2 levels) in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `map'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:24:in `block in run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/repor
ter.rb:12:in `report'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/comma
nd_line.rb:21:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:80:in `run_in_process'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:69:in `run'
     # C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runne
r.rb:11:in `block in autorun'

Finished in 0.67188 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/views/user_msts/new.html.erb_spec.rb:19 # user_msts/new.html.erb re
nders new user_mst form

Here it is.

Did you try stubbing GroupMst.all as I suggested?

_______________________________________________
rspec-users mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-users