Sha256: 7c44e3bbfa92170d1eb66b0174453ade8c5aa604b819211735e51196e2c5bec2
Contents?: true
Size: 644 Bytes
Versions: 2
Compression:
Stored size: 644 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facet/string/to_proc.rb # # Extracted Mon Mar 13 13:24:08 UTC 2006 # Unit Tools Reap Test Extractor # require 'facet/string/to_proc.rb' require 'test/unit' class TCString < Test::Unit::TestCase def test_to_proc assert_nothing_raised { @add = '|x,y| x + y'.to_proc } assert_equal(4, @add.call(2,2)) @t = 3 @multi = '|y| @t * y'.to_proc(self) assert_equal(6, @multi.call(2)) x = 4 @div = '|y| x / y'.to_proc(binding) assert_equal(2, @div.call(2)) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
facets-1.1.0 | test/lib/facet/string/test_to_proc.rb |
facets-1.2.0 | test/lib/facet/string/test_to_proc.rb |