Sha256: c61da8c0e02f7bdb9f79b0036bf142a2f8e9b33e271f124c3c27f09da9528d06

Contents?: true

Size: 388 Bytes

Versions: 5

Compression:

Stored size: 388 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', 'helper')
require 'ludy/symbol'

class TestSymbol < Test::Unit::TestCase
  def test_curry
    a = [1,2,3]
    assert_equal nil, a.find(&:==.curry[0])
    assert_equal 2, a.find(&:==.curry[2])
  end
  def test_to_msg
    assert_equal [3, 7], [[1,2],[3,4]].map(&:'inject(&:+)'.to_msg)
    assert_equal 29, :'to_i*2+9'.to_msg['10']
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
godfat-ludy-0.1.13 test/ludy/test_symbol.rb
ludy-0.1.11 test/ludy/test_symbol.rb
ludy-0.1.10 test/ludy/test_symbol.rb
ludy-0.1.13 test/ludy/test_symbol.rb
ludy-0.1.9 test/ludy/test_symbol.rb