Sha256: da15dc2a1a4ae9bd68f5846e32fa3d062f8695f9b7d5b1f0582b67f6a08e5ecc

Contents?: true

Size: 384 Bytes

Versions: 26

Compression:

Stored size: 384 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |
#   |_|\___||___/\__|
#
require 'facets/array/only.rb'

require 'test/unit'

class TestArrayOnly < Test::Unit::TestCase

  def test_only
    assert_equal(5,   [5].only)
    assert_equal(nil, [nil].only)
    assert_raise(IndexError) { [].only }
    assert_raise(IndexError) { [1,2,3].only }
  end

end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/array/test_only.rb
facets-2.8.3 test/core/array/test_only.rb
facets-2.8.2 test/core/array/test_only.rb
facets-2.8.1 test/core/array/test_only.rb
facets-2.8.0 test/core/array/test_only.rb
facets-2.7.0 test/core/array/test_only.rb
facets-2.6.0 test/core/array/test_only.rb
facets-2.0.4 test/unit/array/test_only.rb
facets-2.0.5 test/unit/array/test_only.rb
facets-2.1.0 test/unit/array/test_only.rb
facets-2.1.1 test/unit/array/test_only.rb
facets-2.1.2 test/unit/array/test_only.rb
facets-2.0.3 test/unit/array/test_only.rb
facets-2.4.0 test/array/test_only.rb
facets-2.1.3 test/unit/array/test_only.rb
facets-2.2.0 test/unit/array/test_only.rb
facets-2.2.1 test/unit/array/test_only.rb
facets-2.3.0 test/core/array/test_only.rb
facets-2.4.1 test/array/test_only.rb
facets-2.4.2 test/core/array/test_only.rb