C:\Documents and Settings\Oliver\Desktop\ams>rspec
spec/views/user_msts/new.html.erb_spec.rb:19 --backtraceRun 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/helpers/capture_helper.rb:40:in
`block in capture' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/helpers/capture_helper.rb:172:in
`with_output_buffer' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/helpers/capture_helper.rb:40:in
`capture' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/helpers/form_helper.rb:545:in
`fields_for' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/helpers/form_helper.rb:320:in
`form_for' # ./app/views/user_msts/_form.html.erb:1: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/template.rb:135:in
`block in render' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in
`block in instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications/instrumenter.rb:21:in
`instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in
`instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/template.rb:127:in
`render' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/render/partials.rb:333:in
`render_partial' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/render/partials.rb:262:in
`block in render' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in
`block in instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications/instrumenter.rb:21:in
`instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in
`instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/render/partials.rb:260:in
`render' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/render/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/render/rendering.rb:31:in
`render' # ./app/views/user_msts/new.html.erb:3:in
`_app_views_user_msts_new_html_erb__441458415_16571532__735039642' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/template.rb:135:in
`block in render' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in
`block in instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications/instrumenter.rb:21:in
`instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in
`instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/template.rb:127:in
`render' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/render/rendering.rb:59:in
`block in
_render_template' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in
`block in instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications/instrumenter.rb:21:in
`instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in
`instrument' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/render/rendering.rb:56:in
`_render_template' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_view/render/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 <top (required)>' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:48:in
`instance_eval' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:48:in
`block in run' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:107:in
`with_around_hooks' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:45:in
`run' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/example_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/example_group.rb:290:in
`map' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:290:in
`run_examples' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:262:in
`run' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/command_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/command_line.rb:24:in
`map' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in
`block in run' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:12:in
`report' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:21:in
`run' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in
`run_in_process' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69:in
`run' #
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in
`block in autorun'
Finished in 0.67188 seconds1 example, 1 failure
Failed examples:
rspec ./spec/views/user_msts/new.html.erb_spec.rb:19 # user_msts/new.html.erb
renders new user_mst form
Here it is.
--
View this message in context:
http://ruby.11.x6.nabble.com/help-renders-new-edit-user-mst-form-tp4991623p4991644.html
Sent from the rspec-users mailing list archive at Nabble.com.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users