aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2011-12-21 09:25:29 +0200
committerUģis Ozols <ugis.ozolss@gmail.com>2011-12-21 09:29:59 +0200
commitee69ef62a8edf6adfa4aba33e5d4f61ad55b6a25 (patch)
treeab30f1b36fd056a1c9bd24b23ef1f66a746e87dd /activesupport/test
parent8e749cd4bd3d3cefa75636fb9ade1672c3c980d3 (diff)
downloadrails-ee69ef62a8edf6adfa4aba33e5d4f61ad55b6a25.tar.gz
rails-ee69ef62a8edf6adfa4aba33e5d4f61ad55b6a25.tar.bz2
rails-ee69ef62a8edf6adfa4aba33e5d4f61ad55b6a25.zip
Remove some of the ActiveSupport core extensions related to 1.8.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/float_ext_test.rb26
-rw-r--r--activesupport/test/core_ext/io_test.rb23
2 files changed, 0 insertions, 49 deletions
diff --git a/activesupport/test/core_ext/float_ext_test.rb b/activesupport/test/core_ext/float_ext_test.rb
deleted file mode 100644
index ac7e7a8ed6..0000000000
--- a/activesupport/test/core_ext/float_ext_test.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-require 'abstract_unit'
-require 'active_support/core_ext/float/rounding'
-
-class FloatExtRoundingTests < Test::Unit::TestCase
- def test_round_for_positive_number
- assert_equal 1, 1.4.round
- assert_equal 2, 1.6.round
- assert_equal 2, 1.6.round(0)
- assert_equal 1.4, 1.4.round(1)
- assert_equal 1.4, 1.4.round(3)
- assert_equal 1.5, 1.45.round(1)
- assert_equal 1.45, 1.445.round(2)
- end
-
- def test_round_for_negative_number
- assert_equal( -1, -1.4.round )
- assert_equal( -2, -1.6.round )
- assert_equal( -1.4, -1.4.round(1) )
- assert_equal( -1.5, -1.45.round(1) )
- end
-
- def test_round_with_negative_precision
- assert_equal 123460.0, 123456.0.round(-1)
- assert_equal 123500.0, 123456.0.round(-2)
- end
-end
diff --git a/activesupport/test/core_ext/io_test.rb b/activesupport/test/core_ext/io_test.rb
deleted file mode 100644
index b9abf685da..0000000000
--- a/activesupport/test/core_ext/io_test.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require 'abstract_unit'
-
-require 'active_support/core_ext/io'
-
-class IOTest < Test::Unit::TestCase
- def test_binread_one_arg
- assert_equal File.read(__FILE__), IO.binread(__FILE__)
- end
-
- def test_binread_two_args
- assert_equal File.read(__FILE__).bytes.first(10).pack('C*'),
- IO.binread(__FILE__, 10)
- end
-
- def test_binread_three_args
- actual = IO.binread(__FILE__, 5, 10)
- expected = File.open(__FILE__, 'rb') { |f|
- f.seek 10
- f.read 5
- }
- assert_equal expected, actual
- end
-end