instiki/vendor/rails/activesupport/test/core_ext/proc_test.rb
Jacques Distler 5292899c9a Rails 2.1 RC1
Updated Instiki to Rails 2.1 RC1 (aka 2.0.991).
2008-05-17 23:22:34 -05:00

12 lines
308 B
Ruby

require 'abstract_unit'
class ProcTests < Test::Unit::TestCase
def test_bind_returns_method_with_changed_self
block = Proc.new { self }
assert_equal self, block.call
bound_block = block.bind("hello")
assert_not_equal block, bound_block
assert_equal "hello", bound_block.call
end
end