aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/object/self_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2014-08-01 10:07:38 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2014-08-01 10:07:38 -0700
commit702ad710b57bef45b081ebf42e6fa70820fdd810 (patch)
treed6b1542c65b2e80d3e921d04e58d77b60d5b92d2 /activesupport/test/core_ext/object/self_test.rb
parent20405e516b031db4d8230014d1dcf9601ed0a0f8 (diff)
downloadrails-702ad710b57bef45b081ebf42e6fa70820fdd810.tar.gz
rails-702ad710b57bef45b081ebf42e6fa70820fdd810.tar.bz2
rails-702ad710b57bef45b081ebf42e6fa70820fdd810.zip
Added Object#self which returns the object itself
Diffstat (limited to 'activesupport/test/core_ext/object/self_test.rb')
-rw-r--r--activesupport/test/core_ext/object/self_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/object/self_test.rb b/activesupport/test/core_ext/object/self_test.rb
new file mode 100644
index 0000000000..751199e41c
--- /dev/null
+++ b/activesupport/test/core_ext/object/self_test.rb
@@ -0,0 +1,9 @@
+require 'abstract_unit'
+require 'active_support/core_ext/object'
+
+class Object::SelfTest < ActiveSupport::TestCase
+ test 'self returns self' do
+ object = 'fun'
+ assert_equal object, object.self
+ end
+end