diff options
author | Kabari Hendrick <kabari@gmail.com> | 2010-03-14 01:33:45 -0600 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-27 02:07:04 -0700 |
commit | b081948bb3e1a6874f133140bf07e7fb9d3359d9 (patch) | |
tree | ba4ad456cf94d4e563c539f2249f5a4555836fea /activesupport/test/core_ext/class | |
parent | 334983eca042b5016d3d79d7ed5761b60ba871ed (diff) | |
download | rails-b081948bb3e1a6874f133140bf07e7fb9d3359d9.tar.gz rails-b081948bb3e1a6874f133140bf07e7fb9d3359d9.tar.bz2 rails-b081948bb3e1a6874f133140bf07e7fb9d3359d9.zip |
fixing inconsistency with cattr_reader and matter_reader [#4172 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
Diffstat (limited to 'activesupport/test/core_ext/class')
-rw-r--r-- | activesupport/test/core_ext/class/attribute_accessor_test.rb | 8 |
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 |