Defect #7266

Test test_due_date_distance_in_words fail due to undefined locale

Added by Etienne Massip almost 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:2011-01-10
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:I18n
Target version:1.1.1
Resolution:Fixed Affected version:

Description

Overloaded ActiveView::Helpers::DateHelper::due_date_distance_in_words() method returns a localized string which depends upon current I18n.locale value.

When running in a batch, the test test_due_date_distance_in_words fail if this value have been set by a previous translation test to something else than default 'en'.

Test trace :

<"over 54 years late"> expected but was
<"oltre 54 anni di ritardo">.
test/unit/helpers/application_helper_test.rb:615:in `test_due_date_distance_in_words'
test/unit/helpers/application_helper_test.rb:614:in `each'
test/unit/helpers/application_helper_test.rb:614:in `test_due_date_distance_in_words'
D:\install\eclipse_b\eclipse\configuration\org.eclipse.osgi\bundles\948\1\.cp\testing\dltk-testunit-runner.rb:77:in `start'

Associated revisions

Revision 4677
Added by Jean-Philippe Lang almost 7 years ago

Make sure en is the current locale when running the test (#7266).

History

#1 Updated by Jean-Philippe Lang almost 7 years ago

  • Status changed from New to Resolved
  • Target version set to 1.1.1
  • Resolution set to Fixed

r4677 should fix it.

#2 Updated by Jean-Philippe Lang almost 7 years ago

  • Status changed from Resolved to Closed

Merged in 1.1-stable.

Also available in: Atom PDF