On Mon, Jun 10, 2013 at 5:53 AM, oliver <oliverjesus2...@yahoo.com> 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 rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users