Sha256: 264707cb7384a6687611e6e0e0d7fc5c606abf2ff857b62413ff94eef4d2ff89
Contents?: true
Size: 644 Bytes
Versions: 1
Compression:
Stored size: 644 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facet/string/to_proc.rb # # Extracted Wed Jan 25 11:25:39 EST 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.0.3 | packages/core/test/lib/facet/string/test_to_proc.rb |