aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/json/encoding_test_cases.rb
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2016-06-26 10:43:38 +0800
committerGitHub <noreply@github.com>2016-06-26 10:43:38 +0800
commitf4c0dfb8263aeb77c1db2ac3753a58ac5412baef (patch)
tree5db267ae5ae4e6c94aececf6c7bca0d923cce04b /activesupport/test/json/encoding_test_cases.rb
parentd66adf12ba0a32528f3b517f8ead7321f53c0cc5 (diff)
parentabbf00e5830141d3eda451e10bf12c3dccf668ec (diff)
downloadrails-f4c0dfb8263aeb77c1db2ac3753a58ac5412baef.tar.gz
rails-f4c0dfb8263aeb77c1db2ac3753a58ac5412baef.tar.bz2
rails-f4c0dfb8263aeb77c1db2ac3753a58ac5412baef.zip
Merge pull request #25526 from tricknotes/pathname-as-json
Define `Pathname#as_json`
Diffstat (limited to 'activesupport/test/json/encoding_test_cases.rb')
-rw-r--r--activesupport/test/json/encoding_test_cases.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/test/json/encoding_test_cases.rb b/activesupport/test/json/encoding_test_cases.rb
index 60d8685d32..e043fadf56 100644
--- a/activesupport/test/json/encoding_test_cases.rb
+++ b/activesupport/test/json/encoding_test_cases.rb
@@ -78,6 +78,8 @@ module JSONTest
URITests = [[ URI.parse('http://example.com'), %("http://example.com") ]]
+ PathnameTests = [[ Pathname.new('lib/index.rb'), %("lib/index.rb") ]]
+
DateTests = [[ Date.new(2005,2,1), %("2005/02/01") ]]
TimeTests = [[ Time.utc(2005,2,1,15,15,10), %("2005/02/01 15:15:10 +0000") ]]
DateTimeTests = [[ DateTime.civil(2005,2,1,15,15,10), %("2005/02/01 15:15:10 +0000") ]]