Sha256: 82eca590a5f8c00aa04c9eff176a6ecea0ca4576ed1e4c0d6e2cf7c441d392ed
Contents?: true
Size: 667 Bytes
Versions: 1
Compression:
Stored size: 667 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/binding/self/of_caller.rb # # Extracted Wed Aug 23 18:22:53 EDT 2006 # Unit Tools Reap Test Extractor # require 'facets/core/binding/self/of_caller.rb' require 'test/unit' class TC_Binding < Test::Unit::TestCase def inc_counter(amount = 1) Binding.of_caller do |binding| inc = eval("lambda { |arg| counter += arg }", binding) inc.call(amount) end end def test_of_caller counter = 0 2.times { inc_counter } assert_equal( 2, counter ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.7.30 | test/lib/facets/core/binding/self/test_of_caller.rb |