aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/base_test.rb
diff options
context:
space:
mode:
authorTobias Lütke <tobias.luetke@gmail.com>2007-05-04 20:07:37 +0000
committerTobias Lütke <tobias.luetke@gmail.com>2007-05-04 20:07:37 +0000
commit0306e4a20483a91d9288ac6f20e6b79db6eca7a7 (patch)
tree21323db118c65adfb502b3bdf56693644a4aabc5 /activeresource/test/base_test.rb
parent0c960602fe13a05a787b1cad85d61f8a45b08427 (diff)
downloadrails-0306e4a20483a91d9288ac6f20e6b79db6eca7a7.tar.gz
rails-0306e4a20483a91d9288ac6f20e6b79db6eca7a7.tar.bz2
rails-0306e4a20483a91d9288ac6f20e6b79db6eca7a7.zip
Make respond_to? work as expected
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/test/base_test.rb')
-rw-r--r--activeresource/test/base_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activeresource/test/base_test.rb b/activeresource/test/base_test.rb
index 6a6ee5c64b..e9bf5d70b3 100644
--- a/activeresource/test/base_test.rb
+++ b/activeresource/test/base_test.rb
@@ -178,6 +178,14 @@ class BaseTest < Test::Unit::TestCase
assert_kind_of Person, matz
assert_equal "Matz", matz.name
end
+
+ def test_respond_to
+ matz = Person.find(1)
+ assert matz.respond_to?(:name)
+ assert matz.respond_to?(:name=)
+ assert matz.respond_to?(:name?)
+ assert !matz.respond_to?(:java)
+ end
def test_find_by_id_with_custom_prefix
addy = StreetAddress.find(1, :params => { :person_id => 1 })