diff options
author | Andrew White <andrew.white@unboxed.co> | 2016-11-03 17:23:29 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2016-11-03 17:23:29 +0000 |
commit | 47c1aee5641dab399d3eb0b0089f31fcdb2eee41 (patch) | |
tree | 75b530a113bc77b30d4aa14ef0e279ee718a2207 | |
parent | 707f59042a58d329f8237ba5af1af8bca51e2266 (diff) | |
download | rails-47c1aee5641dab399d3eb0b0089f31fcdb2eee41.tar.gz rails-47c1aee5641dab399d3eb0b0089f31fcdb2eee41.tar.bz2 rails-47c1aee5641dab399d3eb0b0089f31fcdb2eee41.zip |
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
-rw-r--r-- | activesupport/test/abstract_unit.rb | 7 |
1 files changed, 4 insertions, 3 deletions
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 |