aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/class/attribute_accessor_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-27 11:07:07 +0100
committerJosé Valim <jose.valim@gmail.com>2010-03-27 11:07:07 +0100
commit418e5fc279b19c0d35d3f2b6b5ce216a566c8fc2 (patch)
tree33d51b954b8f6cac5e64e64d2152d6b0ca8cc40c /activesupport/test/core_ext/class/attribute_accessor_test.rb
parent0cb3311d06c02649fb7444c34b6fdf2214ab85f5 (diff)
parenta24a888afe5652e391ce2ea682596686af5ec58b (diff)
downloadrails-418e5fc279b19c0d35d3f2b6b5ce216a566c8fc2.tar.gz
rails-418e5fc279b19c0d35d3f2b6b5ce216a566c8fc2.tar.bz2
rails-418e5fc279b19c0d35d3f2b6b5ce216a566c8fc2.zip
Merge branch 'master' of gitproxy:rails/rails
Diffstat (limited to 'activesupport/test/core_ext/class/attribute_accessor_test.rb')
-rw-r--r--activesupport/test/core_ext/class/attribute_accessor_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/class/attribute_accessor_test.rb b/activesupport/test/core_ext/class/attribute_accessor_test.rb
index 2214ba9894..0f579d12e5 100644
--- a/activesupport/test/core_ext/class/attribute_accessor_test.rb
+++ b/activesupport/test/core_ext/class/attribute_accessor_test.rb
@@ -5,7 +5,8 @@ class ClassAttributeAccessorTest < Test::Unit::TestCase
def setup
@class = Class.new do
cattr_accessor :foo
- cattr_accessor :bar, :instance_writer => false
+ cattr_accessor :bar, :instance_writer => false
+ cattr_reader :shaq, :instance_reader => false
end
@object = @class.new
end
@@ -29,4 +30,9 @@ class ClassAttributeAccessorTest < Test::Unit::TestCase
assert @object.respond_to?(:bar)
assert !@object.respond_to?(:bar=)
end
+
+ def test_should_not_create_instance_reader
+ assert @class.respond_to?(:shaq)
+ assert !@object.respond_to?(:shaq)
+ end
end