Sha256: 44267983c043f3787353ae96517084d6a54bb3b22d56ccf12855ceb97a3ce78a

Contents?: true

Size: 405 Bytes

Versions: 9

Compression:

Stored size: 405 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', 'lib', 'ludy/test/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

9 entries across 9 versions & 1 rubygems

Version Path
ludy-0.1.1 test/test_symbol.rb
ludy-0.1.2 test/test_symbol.rb
ludy-0.1.0 test/test_symbol.rb
ludy-0.1.5 test/test_symbol.rb
ludy-0.1.6 test/test_symbol.rb
ludy-0.1.7 test/test_symbol.rb
ludy-0.1.8 test/test_symbol.rb
ludy-0.1.4 test/test_symbol.rb
ludy-0.1.3 test/test_symbol.rb