Sha256: 49e0f5c883975c6dbc3059b416027d730b4d9ca49b247ae3822dbbc8d8d21c05
Contents?: true
Size: 652 Bytes
Versions: 1
Compression:
Stored size: 652 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/string/to_proc.rb # # Extracted Fri Feb 16 02:00:37 EST 2007 # Project.rb Test Extraction # require 'facets/core/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.8.49 | test/lib/facets/core/string/test_to_proc.rb |