aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/json/encoding_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/json/encoding_test.rb')
-rw-r--r--activesupport/test/json/encoding_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb
index 9f4b62fd8b..5fc2e16336 100644
--- a/activesupport/test/json/encoding_test.rb
+++ b/activesupport/test/json/encoding_test.rb
@@ -422,6 +422,11 @@ EXPECTED
assert_equal '"1999-12-31T19:00:00.000-05:00"', ActiveSupport::JSON.encode(time)
end
+ def test_exception_to_json
+ exception = Exception.new("foo")
+ assert_equal '"foo"', ActiveSupport::JSON.encode(exception)
+ end
+
protected
def object_keys(json_object)