This project is archived and is in readonly mode.

#3021 ✓invalid
Jatinder Singh

Fix failing partial tests - A side effect of a fix added for Ruby 1.9 compat.

Reported by Jatinder Singh | August 9th, 2009 @ 08:21 AM

2 tests started failing after this commit

I've attached a patch along to fix the tests.

  1) Error:
test_partial_collection_shorthand_with_different_types_of_records(RenderTest):
NoMethodError: undefined method `include?' for nil:NilClass
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:255:in `find'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:237:in `render_collection'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:235:in `map'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:235:in `render_collection'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:202:in `render'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:282:in `_render_partial'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:278:in `render_partial'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/rendering_controller.rb:58:in `render_to_body'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/rendering_controller.rb:29:in `render_to_body'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/render_options.rb:35:in `render_to_body'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/layouts.rb:96:in `render_to_body'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/compatibility.rb:104:in `render_to_body'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/rendering_controller.rb:45:in `render'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/rendering_controller.rb:13:in `render'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/base.rb:102:in `render'
    ./test/controller/render_test.rb:572:in `partial_collection_shorthand_with_different_types_of_records'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/base.rb:43:in `send_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/base.rb:43:in `send_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/base.rb:113:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/logger.rb:32:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/callbacks.rb:20:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/../../activesupport/lib/active_support/new_callbacks.rb:402:in `_run__605558038__process_action__925668488__callbacks'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/../../activesupport/lib/active_support/new_callbacks.rb:375:in `send'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/../../activesupport/lib/active_support/new_callbacks.rb:375:in `_run_process_action_callbacks'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/callbacks.rb:19:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/url_for.rb:9:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/rendering_controller.rb:9:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/compatibility.rb:80:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/flash.rb:140:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/rescuable.rb:46:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/base.rb:91:in `process'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/filter_parameter_logging.rb:69:in `process'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/testing.rb:12:in `process_with_new_base_test'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/testing/process.rb:145:in `process'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/testing/process.rb:93:in `get'
    ./test/controller/render_test.rb:1252:in `test_partial_collection_shorthand_with_different_types_of_records'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run'

  2) Error:
test_partial_collection_shorthand_with_locals(RenderTest):
NoMethodError: undefined method `include?' for nil:NilClass
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:255:in `find'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:237:in `render_collection'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:235:in `map'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:235:in `render_collection'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:202:in `render'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:282:in `_render_partial'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_view/render/partials.rb:278:in `render_partial'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/rendering_controller.rb:58:in `render_to_body'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/rendering_controller.rb:29:in `render_to_body'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/render_options.rb:35:in `render_to_body'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/layouts.rb:96:in `render_to_body'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/compatibility.rb:104:in `render_to_body'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/rendering_controller.rb:45:in `render'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/rendering_controller.rb:13:in `render'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/base.rb:102:in `render'
    ./test/controller/render_test.rb:561:in `partial_collection_shorthand_with_locals'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/base.rb:43:in `send_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/base.rb:43:in `send_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/base.rb:113:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/logger.rb:32:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/callbacks.rb:20:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/../../activesupport/lib/active_support/new_callbacks.rb:402:in `_run__605558038__process_action__933444394__callbacks'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/../../activesupport/lib/active_support/new_callbacks.rb:375:in `send'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/../../activesupport/lib/active_support/new_callbacks.rb:375:in `_run_process_action_callbacks'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/callbacks.rb:19:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/url_for.rb:9:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/rendering_controller.rb:9:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/compatibility.rb:80:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/flash.rb:140:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/rescuable.rb:46:in `process_action'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/abstract_controller/base.rb:91:in `process'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/filter_parameter_logging.rb:69:in `process'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/metal/testing.rb:12:in `process_with_new_base_test'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/testing/process.rb:145:in `process'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../lib/action_controller/testing/process.rb:93:in `get'
    ./test/controller/render_test.rb:1245:in `test_partial_collection_shorthand_with_locals'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
    /Users/jatindersingh/Desktop/bugmash/rails/actionpack/test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run'

2315 tests, 11045 assertions, 0 failures, 2 errors

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages