instiki/vendor/rails/activesupport/test/core_ext/proc_test.rb
Jacques Distler c358389f25 TeX and CSS tweaks.
Sync with latest Instiki Trunk
(Updates Rails to 1.2.2)
2007-02-09 02:04:31 -06:00

12 lines
337 B
Ruby

require File.dirname(__FILE__) + '/../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