Sha256: 438030001da7e809c9e71f3e91d70723c02c00ebbf9a3071924d2d7ae63e1dcd

Contents?: true

Size: 612 Bytes

Versions: 1

Compression:

Stored size: 612 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/proc/op_mul.rb
#
# Extracted Fri Feb 16 02:00:36 EST 2007
# Project.rb Test Extraction
#

require 'facets/core/proc/op_mul.rb'


  require 'test/unit'

  class TCProc < Test::Unit::TestCase

    def test_compose_op
      a = lambda { |x| x + 4 }
      b = lambda { |y| y / 2 }
      assert_equal( 6, (a * b).call(4) )
      assert_equal( 4, (b * a).call(4) )
    end

    def test_times_collect_op
      a = lambda { |x| x + 4 }
      assert_equal( [4,5,6], a * 3 )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.8.49 test/lib/facets/core/proc/test_op_mul.rb