Sha256: 51efd7d00342159ecfb627779746f96926de89c202ae35405e3f314ef8cbc114

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/more/nackclass.rb
#
# Extracted Wed Jul 05 11:47:50 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/more/nackclass.rb'


  require 'test/unit'

  class TC_Nack < Test::Unit::TestCase

    def scalar( x )
      if x.kind_of?(Enumerable)
        return nack(ArgumentError, "Value cannot not be enumerable")
      end
      x
    end

    def test000
      assert_equal( 1, scalar(1) )
    end

    def test001
      assert_equal( nack, scalar([1,2]) )
    end

    def test002
      assert_equal( 1, nail(scalar(1)) )
    end

    def test003
      assert_raises(ArgumentError) { nail(scalar([1,2])) }
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.4.5 test/lib/facets/more/test_nackclass.rb