Sha256: b66cc77cb58ebfb9da8968f3ef72884812dcf4fd00d57bf5f43f7a6d243b704d
Contents?: true
Size: 655 Bytes
Versions: 1
Compression:
Stored size: 655 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facet/binding/self/of_caller.rb # # Extracted Wed Jan 25 11:25:39 EST 2006 # Unit Tools Reap Test Extractor # require 'facet/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.0.3 | packages/core/test/lib/facet/binding/self/test_of_caller.rb |