diff options
author | John Firebaugh <john_firebaugh@us.ibm.com> | 2011-02-21 16:29:10 -0800 |
---|---|---|
committer | John Firebaugh <john_firebaugh@us.ibm.com> | 2011-07-17 11:34:06 -0700 |
commit | 2a9a10f5e3d4d8fc607606e700d1fd2dfec4eda2 (patch) | |
tree | e5808a31a7eb4b9600a64d0855325672d307e190 | |
parent | da4e1faf6f77732844a0fec4cbc9967be3156523 (diff) | |
download | rails-2a9a10f5e3d4d8fc607606e700d1fd2dfec4eda2.tar.gz rails-2a9a10f5e3d4d8fc607606e700d1fd2dfec4eda2.tar.bz2 rails-2a9a10f5e3d4d8fc607606e700d1fd2dfec4eda2.zip |
Add a test
-rw-r--r-- | activemodel/test/cases/serialization_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activemodel/test/cases/serialization_test.rb b/activemodel/test/cases/serialization_test.rb index 05b906b601..10cb600e7b 100644 --- a/activemodel/test/cases/serialization_test.rb +++ b/activemodel/test/cases/serialization_test.rb @@ -52,4 +52,9 @@ class SerializationTest < ActiveModel::TestCase assert_equal expected , @user.serializable_hash(:except => [:name, :email], :methods => [:foo]) end + def test_should_not_call_methods_that_dont_respond + expected = {"name"=>"David", "gender"=>"male", "email"=>"david@example.com"} + assert_equal expected , @user.serializable_hash(:methods => [:bar]) + end + end |