aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorPeter Wagenet <peter.wagenet@gmail.com>2010-08-06 13:00:04 -0700
committerwycats <wycats@gmail.com>2010-08-16 18:36:12 -0700
commitad53b68457af0f3c4e875309f298335a17b9029c (patch)
treecbad6ec8720988bff174b73014a491ddb2bc8a19 /activesupport/test
parentfb6b80562041e8d2378cad1b51f8c234fe76fd5e (diff)
downloadrails-ad53b68457af0f3c4e875309f298335a17b9029c.tar.gz
rails-ad53b68457af0f3c4e875309f298335a17b9029c.tar.bz2
rails-ad53b68457af0f3c4e875309f298335a17b9029c.zip
Class Attribute setter returns set value
Signed-off-by: wycats <wycats@gmail.com>
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/class/attribute_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/class/attribute_test.rb b/activesupport/test/core_ext/class/attribute_test.rb
index 24aa5c0eba..d58b60482b 100644
--- a/activesupport/test/core_ext/class/attribute_test.rb
+++ b/activesupport/test/core_ext/class/attribute_test.rb
@@ -65,4 +65,9 @@ class ClassAttributeTest < ActiveSupport::TestCase
object.singleton_class.setting = 'foo'
assert_equal 'foo', object.setting
end
+
+ test 'setter returns set value' do
+ val = @klass.send(:setting=, 1)
+ assert_equal 1, val
+ end
end