From 47c1aee5641dab399d3eb0b0089f31fcdb2eee41 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Thu, 3 Nov 2016 17:23:29 +0000 Subject: Fix method redefined warnings for + and - on Time The power_assert gem has a workaround for a Ruby 2.3 bug[1] which causes method refined warnings with operator methods on Time. Work around the workaround by loading Active Support time extensions before loading the test-unit gem. [1]: https://bugs.ruby-lang.org/issues/11182 --- activesupport/test/abstract_unit.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'activesupport/test') diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index a777708e0c..cbe491eb73 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -22,14 +22,15 @@ if "ruby".encoding_aware? end end +ENV['NO_RELOAD'] = '1' +require 'active_support' +require 'active_support/time' + require 'test/unit' require 'empty_bool' silence_warnings { require 'mocha/setup' } -ENV['NO_RELOAD'] = '1' -require 'active_support' - # Disable available locale checks to avoid warnings running the test suite. I18n.enforce_available_locales = false -- cgit v1.2.3