diff options
author | Xavier Noria <fxn@hashref.com> | 2012-01-02 13:53:52 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-01-02 13:53:52 -0800 |
commit | e04232e9040646d117df14cde626375d9d4be48a (patch) | |
tree | c1a89e65f9bdd577eb9e30ff235baf93e0b84f80 /activesupport/test | |
parent | 6de1b2ad89bdc0d7348e2805a7ac66c9d6e89653 (diff) | |
parent | dc05914be766583a22c959b2df64cfd2dfe88732 (diff) | |
download | rails-e04232e9040646d117df14cde626375d9d4be48a.tar.gz rails-e04232e9040646d117df14cde626375d9d4be48a.tar.bz2 rails-e04232e9040646d117df14cde626375d9d4be48a.zip |
Merge pull request #4250 from lest/range-json
use #to_s to convert Range to json
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/json/encoding_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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") ]] |