Defect #4543
closedTests broken with ruby 1.9
100%
Description
All tests that use exemplars from nofxx-object_daddy gem raise an error when running with ruby 1.9, making impossible to work on ruby 1.9 Redmine support.
Example:
25) Error: test: User#find_by_api_key should return the user if the key is found for an act ive user. (UserTest): NoMethodError: undefined method `each' for "C:/workspace/trunk/test/exemplars":S tring C:/dev/ruby/lib/ruby/gems/1.9.1/gems/nofxx-object_daddy-0.4.1/lib/object_dad dy.rb:98:in `gather_exemplars' C:/dev/ruby/lib/ruby/gems/1.9.1/gems/nofxx-object_daddy-0.4.1/lib/object_dad dy.rb:94:in `gather_exemplars' C:/dev/ruby/lib/ruby/gems/1.9.1/gems/nofxx-object_daddy-0.4.1/lib/object_dad dy.rb:29:in `spawn' C:/workspace/trunk/test/object_daddy_helpers.rb:5:in `generate_with_protecte d!' C:/workspace/trunk/test/unit/user_test.rb:180:in `block (2 levels) in <class :UserTest>' C:/dev/ruby/lib/ruby/gems/1.9.1/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/c ontext.rb:351:in `call' C:/dev/ruby/lib/ruby/gems/1.9.1/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/c ontext.rb:351:in `block in create_test_from_should_hash' C:/dev/ruby/lib/ruby/gems/1.9.1/gems/mocha-0.9.8/lib/mocha/integration/mini_ test/version_131_and_above.rb:26:in `run' C:/dev/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/ testing/setup_and_teardown.rb:24:in `run'
Tested with ruby 1.9.1p129 + nofxx-object_daddy-0.4.1
Updated by Ryan Bigg almost 15 years ago
Howdy,
I feel this is an object_daddy bug, not a Redmine error. I'm going to formulate and submit a patch to that project now if someone hasn't already done it.
Updated by Alexey Palazhchenko almost 15 years ago
Actually, patch is trivial: http://github.com/AlekSi/redmine/commit/a01830beca8ea21ac3165248f18125e477268be7
Updated by Eric Davis almost 15 years ago
Thanks, I'm planning to build my own object_daddy and merge some other bugfixes.
Updated by Eric Davis almost 15 years ago
- Status changed from New to Resolved
- Target version set to 1.0.0 (RC)
- % Done changed from 0 to 100
- Resolution set to Fixed
I've forked object_daddy, pulled in a few bug fixes, and fixed a few Ruby 1.9 bugs in it. Redmine r3398 will use my version and the tests are now running under 1.9. Several of the failures look like they are related to Coderay or the syntax highlighting features.
ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
Should this be merged into 0.9-stable for 0.9.3? Jean-Philippe, could you create a 0.9.3 Version and close 0.9.2?
Updated by Jean-Philippe Lang almost 15 years ago
Should this be merged into 0.9-stable for 0.9.3?
0.9.3 is not supposed to run with ruby 1.9, we should first make trunk pass all tests with 1.9.
But if it's needed for merging other fixes in the stable branch, go ahead.
Jean-Philippe, could you create a 0.9.3 Version and close 0.9.2?
Done.
Updated by Eric Davis almost 15 years ago
- Target version changed from 1.0.0 (RC) to 0.9.3
Ok, I'll merge the commit to 0.9.3 since it was done to fix some object_daddy bugs, not really for 1.9 support.
Updated by Jean-Philippe Lang almost 15 years ago
- Status changed from Resolved to Closed
Merged in 0.9-stable in r3465.