fedora-migrator /vendor/gems/facets-2.4.5/test/core/array/test_only.rb

Language Ruby Lines 22
MD5 Hash e7eb4f0b5cbdafcda6df322e4f3451e6 Estimated Cost $215 (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
20
#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |
#   |_|\___||___/\__|
#
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
Back to Top