aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/base64_ext_test.rb10
-rw-r--r--activesupport/test/core_ext/range_ext_test.rb4
-rw-r--r--activesupport/test/json/encoding_test.rb4
-rw-r--r--activesupport/test/message_encryptor_test.rb6
4 files changed, 11 insertions, 13 deletions
diff --git a/activesupport/test/core_ext/base64_ext_test.rb b/activesupport/test/core_ext/base64_ext_test.rb
deleted file mode 100644
index 544c990b3c..0000000000
--- a/activesupport/test/core_ext/base64_ext_test.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require 'abstract_unit'
-
-class Base64Test < Test::Unit::TestCase
- def test_no_newline_in_encoded_value
- ActiveSupport::Deprecation.silence do
- assert_match(/\n/, ActiveSupport::Base64.encode64("oneverylongstringthatwouldnormallybesplitupbynewlinesbytheregularbase64"))
- assert_no_match(/\n/, ActiveSupport::Base64.encode64s("oneverylongstringthatwouldnormallybesplitupbynewlinesbytheregularbase64"))
- end
- end
-end
diff --git a/activesupport/test/core_ext/range_ext_test.rb b/activesupport/test/core_ext/range_ext_test.rb
index f4b773e5fb..e50b6c132a 100644
--- a/activesupport/test/core_ext/range_ext_test.rb
+++ b/activesupport/test/core_ext/range_ext_test.rb
@@ -53,6 +53,10 @@ class RangeTest < Test::Unit::TestCase
assert !(2..8).include?(5..9)
end
+ def test_should_include_identical_exclusive_with_floats
+ assert((1.0...10.0).include?(1.0...10.0))
+ end
+
def test_blockless_step
assert_equal [1,3,5,7,9], (1..10).step(2)
end
diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb
index a6435a763a..bebad18e99 100644
--- a/activesupport/test/json/encoding_test.rb
+++ b/activesupport/test/json/encoding_test.rb
@@ -38,6 +38,10 @@ class TestJSONEncoding < Test::Unit::TestCase
ArrayTests = [[ ['a', 'b', 'c'], %([\"a\",\"b\",\"c\"]) ],
[ [1, 'a', :b, nil, false], %([1,\"a\",\"b\",null,false]) ]]
+ RangeTests = [[ 1..2, %("1..2")],
+ [ 1...2, %("1...2")],
+ [ 1.5..2.5, %("1.5..2.5")]]
+
SymbolTests = [[ :a, %("a") ],
[ :this, %("this") ],
[ :"a b", %("a b") ]]
diff --git a/activesupport/test/message_encryptor_test.rb b/activesupport/test/message_encryptor_test.rb
index 11142a358f..b544742300 100644
--- a/activesupport/test/message_encryptor_test.rb
+++ b/activesupport/test/message_encryptor_test.rb
@@ -76,10 +76,10 @@ class MessageEncryptorTest < ActiveSupport::TestCase
end
def munge(base64_string)
- bits = ActiveSupport::Base64.decode64(base64_string)
+ bits = ::Base64.decode64(base64_string)
bits.reverse!
- ActiveSupport::Base64.strict_encode64(bits)
+ ::Base64.strict_encode64(bits)
end
end
-end \ No newline at end of file
+end