From ee69ef62a8edf6adfa4aba33e5d4f61ad55b6a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=A3is=20Ozols?= Date: Wed, 21 Dec 2011 09:25:29 +0200 Subject: Remove some of the ActiveSupport core extensions related to 1.8. --- activesupport/test/core_ext/float_ext_test.rb | 26 -------------------------- activesupport/test/core_ext/io_test.rb | 23 ----------------------- 2 files changed, 49 deletions(-) delete mode 100644 activesupport/test/core_ext/float_ext_test.rb delete mode 100644 activesupport/test/core_ext/io_test.rb (limited to 'activesupport/test/core_ext') 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 -- cgit v1.2.3