This project is archived and is in readonly mode.
Fix failing TranslationHelperTest
Reported by Will Harris | October 29th, 2008 @ 03:05 AM | in 2.x
A simplification to TranslationHelper's translate method's handling of options caused a test failure:
1) Error: test_delegates_to_i18n_setting_the_raise_option(TranslationHelperTest): IndexError: index 3969 out of string
./test/../lib/action_view/helpers/translation_helper.rb:7:in `[]='
./test/../lib/action_view/helpers/translation_helper.rb:7:in `translate'
./test/template/translation_helper_test.rb:14:in `test_delegates_to_i18n_setting_the_raise_option'
./test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `__send__'
./test/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `run'
The test was sending the locale String as the second argument to translate, which was treating it as its options Hash, leading to an error when it tried to index the locale string using a Symbol.
Comments and changes to this ticket
-
Frederick Cheung December 14th, 2008 @ 11:17 PM
- State changed from new to resolved
Was fixed in 4dbfe18b37ad4fa95eecb9082a446c798e84e499
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>