Sha256: 9edf46cfd039331479ae53aeb6102fc8f503564bb051824c347a5527210db0a4
Contents?: true
Size: 667 Bytes
Versions: 1
Compression:
Stored size: 667 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/binding/self/of_caller.rb # # Extracted Mon Jun 05 08:14:29 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.4.0 | test/lib/facets/core/binding/self/test_of_caller.rb |