This project is archived and is in readonly mode.

#5554 ✓resolved
Hans de Graaff

actionpack 2.3.9 form_helper_test test failures

Reported by Hans de Graaff | September 5th, 2010 @ 09:07 AM

When running actionpack's tests I get the following test failures (I've picked one for brevity, the other 23 are similar):

 24) Failure:
    [/var/tmp/portage/dev-ruby/actionpack-2.3.9/work/all/actionpack-2.3.9/lib/action_controller/test_case.rb:119:in `clean_backtrace'
     ./test/template/form_helper_test.rb:411:in `test_text_area_with_size_option'
     /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.9/lib/active_support/testing/setup_and_teardown.rb:57:in `__send__'
     /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.9/lib/active_support/testing/setup_and_teardown.rb:57:in `run']:
<"<textarea name=\"post[body]\" id=\"post_body\" rows=\"820\" cols=\"183\">Back to the hill and over it again!</textarea>"> expected but was
<"<textarea name=\"post[body]\" id=\"post_body\" rows=\"820\" cols=\"183\">What a wonderful world!</textarea>">.

As far as I can tell this happens because both form_helper_test.rb and record_tag_helper_test.rb define a global Post object. Since 'rake test' requires the test files in alphabetical order the definition in record_tag_helper_test.rb wins and the form_helper_test.rb stuff gets to use that Post instead of the one defined in its own file.

Indeed, running each test manually works fine. I'm not sure what the best way to fix this is, and I'm also not sure why this worked for actionpack 2.3.8 because it looks like nothing significant changed.

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=""></a>