Sha256: ffad962a4408daf76f2e719ff54ac18368901d997e884269bde2bad4c3473f67
Contents?: true
Size: 653 Bytes
Versions: 1
Compression:
Stored size: 653 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/nano/binding/self/of_caller.rb # # Extracted Fri Oct 28 14:20:18 EDT 2005 # Unit Tools Reap Test Extractor # require 'nano/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-0.9.0 | test/lib/nano/binding/self/test_of_caller.rb |