fedora-migrator /vendor/gems/facets-2.4.5/test/core/kernel/test_tap.rb

Language Ruby Lines 20
MD5 Hash d9bd0274555d62cac16296dda145d953 Estimated Cost $329 (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
19
require 'facets/kernel/tap'
require 'test/unit'

class TestKernelTap < Test::Unit::TestCase

  def test_tap
    x = "foo"
    r = ("foobar".tap{ gsub!(/bar/, '') })
    assert_equal(x, r)
  end

  def test_tap_array
    x = [1,2,3]
    x.tap{ |a|
      assert_equal(x, a)
    }
  end

end
Back to Top