Tests broken with ruby 1.9
|Assignee:||Eric Davis||% Done:|
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.
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
#2 Updated by Alexey Palazhchenko over 7 years ago
Actually, patch is trivial: http://github.com/AlekSi/redmine/commit/a01830beca8ea21ac3165248f18125e477268be7
#4 Updated by Eric Davis over 7 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?
#5 Updated by Jean-Philippe Lang over 7 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?