Sha256: d2af00452f9524488ec63301faa9a59a7bf409055bb27751276c4825262bc986
Contents?: true
Size: 853 Bytes
Versions: 2
Compression:
Stored size: 853 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ | # |_|\___||___/\__| # # for lib/facets/array/delete.rb # # Extracted Mon Sep 03 16:23:07 -0700 2007 # w/ Test Extraction Ratchet # require 'facets/array/delete.rb' require 'test/unit' class TestArray < Test::Unit::TestCase def test_delete_unless a = [1,2,3] a.delete_unless{ |e| e == 2 } assert_equal( [2], a ) end def test_delete_values a = [1,2,3,4] assert_equal( [1,2], a.delete_values(1,2) ) assert_equal( [3,4], a ) end def test_delete_values_at a = [1,2,3,4] assert_equal( [2,3], a.delete_values_at(1,2) ) assert_equal( [1,4], a ) a = [1,2,3,4] assert_equal( [1,2,3], a.delete_values_at(0..2) ) assert_equal( [4], a ) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
facets-2.0.0 | test/unit/array/test_delete.rb |
facets-2.0.1 | test/unit/array/test_delete.rb |