Sha256: 7654c218c5ebd080cf75b756425afa796f3e7c13aa8fac2bd879850edd5ed3ac
Contents?: true
Size: 729 Bytes
Versions: 10
Compression:
Stored size: 729 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ | # |_|\___||___/\__| # # for lib/facets/kernel/tap.rb # # Extracted Mon Sep 03 16:23:07 -0700 2007 # w/ Test Extraction Ratchet # require 'facets/kernel/tap.rb' require 'test/unit' class TCKernel < Test::Unit::TestCase def test_returning foo = returning( values = [] ) do values << 'bar' values << 'baz' end assert_equal( ['bar', 'baz'], foo ) end 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
Version data entries
10 entries across 10 versions & 1 rubygems