Sha256: b9de892100ecb442d7162845d11a2a45870bb1d74827eb77e5a2273a068570fa

Contents?: true

Size: 296 Bytes

Versions: 16

Compression:

Stored size: 296 Bytes

Contents

require 'facets/integer/of'
require 'test/unit'

class TC_Integer_Of < Test::Unit::TestCase

  def test_of
    a = 4
    b = a.of{ |i| i*2 }
    assert_equal( [0,2,4,6], b )
  end

  def test_times_collect
    a = 4
    b = a.times_collect{ |i| i*2 }
    assert_equal( [0,2,4,6], b )
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/integer/test_of.rb
facets-2.8.3 test/core/integer/test_of.rb
facets-2.8.2 test/core/integer/test_of.rb
facets-2.8.1 test/core/integer/test_of.rb
facets-2.8.0 test/core/integer/test_of.rb
facets-2.7.0 test/core/integer/test_of.rb
facets-2.6.0 test/core/integer/test_of.rb
facets-2.4.0 test/integer/test_of.rb
facets-2.4.1 test/integer/test_of.rb
facets-2.4.2 test/core/integer/test_of.rb
facets-2.4.4 test/core/integer/test_of.rb
facets-2.4.3 test/core/integer/test_of.rb
facets-2.5.0 test/core/integer/test_of.rb
facets-2.5.1 test/core/integer/test_of.rb
facets-2.4.5 test/core/integer/test_of.rb
facets-2.5.2 test/core/integer/test_of.rb