fedora-migrator /vendor/gems/facets-2.4.5/test/core/integer/test_of.rb

Language Ruby Lines 20
MD5 Hash 215b71c57998a0ecfbd69a524d94e9e5 Estimated Cost $306 (why?)
Repository https://bitbucket.org/mediashelf/fedora-migrator View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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
Back to Top