diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-02-28 16:48:14 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-03-21 04:35:15 -0700 |
commit | a4e3aac40a7545285e4d1ccd78adfc41ca3d5f83 (patch) | |
tree | 1cf432cdb6fb06c24faceee1a8554b75daaf5bc5 /activesupport/test/core_ext | |
parent | 6ed42ebdff05f9d28a60e91093d8f9afad03a958 (diff) | |
download | rails-a4e3aac40a7545285e4d1ccd78adfc41ca3d5f83.tar.gz rails-a4e3aac40a7545285e4d1ccd78adfc41ca3d5f83.tar.bz2 rails-a4e3aac40a7545285e4d1ccd78adfc41ca3d5f83.zip |
* Introduce ActiveSupport.core_ext Integer, %w(conversions time etc)
* Convert some extension modules to simply reopening the class
* Remove deprecated Float time extensions
* Fold Base64 extension into ActiveSupport::Base64 since stdlib Base64 is gone
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/duration_test.rb | 20 | ||||
-rw-r--r-- | activesupport/test/core_ext/float_ext_test.rb | 1 |
2 files changed, 1 insertions, 20 deletions
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb index ab5a86668e..0e23c5c2dd 100644 --- a/activesupport/test/core_ext/duration_test.rb +++ b/activesupport/test/core_ext/duration_test.rb @@ -60,26 +60,6 @@ class DurationTest < ActiveSupport::TestCase assert_equal((7 * 24 * 1.7).hours.ago, 1.7.weeks.ago) end - def test_deprecated_fractional_years - years_re = /Fractional years are not respected\. Convert value to integer before calling #years\./ - assert_deprecated(years_re){1.0.years} - assert_deprecated(years_re){1.5.years} - assert_not_deprecated{1.years} - assert_deprecated(years_re){1.0.year} - assert_deprecated(years_re){1.5.year} - assert_not_deprecated{1.year} - end - - def test_deprecated_fractional_months - months_re = /Fractional months are not respected\. Convert value to integer before calling #months\./ - assert_deprecated(months_re){1.5.months} - assert_deprecated(months_re){1.0.months} - assert_not_deprecated{1.months} - assert_deprecated(months_re){1.5.month} - assert_deprecated(months_re){1.0.month} - assert_not_deprecated{1.month} - end - def test_since_and_ago_anchored_to_time_now_when_time_zone_default_not_set Time.zone_default = nil with_env_tz 'US/Eastern' do diff --git a/activesupport/test/core_ext/float_ext_test.rb b/activesupport/test/core_ext/float_ext_test.rb index d19b5ecf47..ac7e7a8ed6 100644 --- a/activesupport/test/core_ext/float_ext_test.rb +++ b/activesupport/test/core_ext/float_ext_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/float/rounding' class FloatExtRoundingTests < Test::Unit::TestCase def test_round_for_positive_number |