diff options
author | José Valim <jose.valim@gmail.com> | 2010-06-26 11:57:43 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-26 12:01:13 +0200 |
commit | 7bd85a8fc2d216a5e2b1d0380df572f782a54d1c (patch) | |
tree | 0e9a1b63353b01244bce81bb7262bfb87e92b997 /activemodel/test/cases/validations | |
parent | cfaaed3f40e820d2b4d60c2d8bc1f9a005cee086 (diff) | |
download | rails-7bd85a8fc2d216a5e2b1d0380df572f782a54d1c.tar.gz rails-7bd85a8fc2d216a5e2b1d0380df572f782a54d1c.tar.bz2 rails-7bd85a8fc2d216a5e2b1d0380df572f782a54d1c.zip |
Work around the fact the JSON gem was overwriting to_json implementation for all Ruby core classes.
This is required because the JSON gem is incompatible with Rails behavior and was not allowing ActiveModel::Errors to be serialized.
So we need to ensure Rails implementation is the one triggered. [#4890 state:resolved]
Diffstat (limited to 'activemodel/test/cases/validations')
-rw-r--r-- | activemodel/test/cases/validations/presence_validation_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/test/cases/validations/presence_validation_test.rb b/activemodel/test/cases/validations/presence_validation_test.rb index b1450586a8..510c13a7c3 100644 --- a/activemodel/test/cases/validations/presence_validation_test.rb +++ b/activemodel/test/cases/validations/presence_validation_test.rb @@ -32,7 +32,7 @@ class PresenceValidationTest < ActiveModel::TestCase assert t.valid? end - test 'accepts array arguments' do + def test_accepts_array_arguments Topic.validates_presence_of %w(title content) t = Topic.new assert t.invalid? |