diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-01-07 13:19:48 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-01-09 00:14:27 -0800 |
commit | c2d23affad0ed4542e3906c334a7b27b07fc695c (patch) | |
tree | 6045d4164363854a6dd917fcbf4af42a299bcfa8 /activesupport/test | |
parent | b1530545d259c144770bd8fd7881cb16160c0afc (diff) | |
download | rails-c2d23affad0ed4542e3906c334a7b27b07fc695c.tar.gz rails-c2d23affad0ed4542e3906c334a7b27b07fc695c.tar.bz2 rails-c2d23affad0ed4542e3906c334a7b27b07fc695c.zip |
Object#tap for Ruby < 1.8.7
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/object_ext_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/object_ext_test.rb b/activesupport/test/core_ext/object_ext_test.rb new file mode 100644 index 0000000000..a413d331c4 --- /dev/null +++ b/activesupport/test/core_ext/object_ext_test.rb @@ -0,0 +1,8 @@ +require 'abstract_unit' + +class ObjectExtTest < Test::Unit::TestCase + def test_tap_yields_and_returns_self + foo = Object.new + assert_equal foo, foo.tap { |x| assert_equal foo, x; :bar } + end +end |