diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-22 23:21:35 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-22 23:21:35 +0000 |
commit | 32b31a2d0dcde4f61c7a7796ecd5ff63e40c607b (patch) | |
tree | cc1a7167065ad5ad97b7a0f9d3a8ce6add5a668b /activesupport/test | |
parent | 82a85e8592be8040ee4aab071f9ae9cc8f19a44b (diff) | |
download | rails-32b31a2d0dcde4f61c7a7796ecd5ff63e40c607b.tar.gz rails-32b31a2d0dcde4f61c7a7796ecd5ff63e40c607b.tar.bz2 rails-32b31a2d0dcde4f61c7a7796ecd5ff63e40c607b.zip |
More tests (closes #7066) [sethladd]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/numeric_ext_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb index 996b166405..a773339b29 100644 --- a/activesupport/test/core_ext/numeric_ext_test.rb +++ b/activesupport/test/core_ext/numeric_ext_test.rb @@ -129,4 +129,19 @@ class NumericExtSizeTest < Test::Unit::TestCase assert_equal right, left end end + + def test_units_as_bytes_independently + assert_equal 3145728, 3.megabytes + assert_equal 3145728, 3.megabyte + assert_equal 3072, 3.kilobytes + assert_equal 3072, 3.kilobyte + assert_equal 3221225472, 3.gigabytes + assert_equal 3221225472, 3.gigabyte + assert_equal 3298534883328, 3.terabytes + assert_equal 3298534883328, 3.terabyte + assert_equal 3377699720527872, 3.petabytes + assert_equal 3377699720527872, 3.petabyte + assert_equal 3458764513820540928, 3.exabytes + assert_equal 3458764513820540928, 3.exabyte + end end |