Sha256: ed565cb36e527e787088f0a17e0904d84a31fa178b3719b5975a71263e0ba6ae

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/more/nackclass.rb
#
# Extracted Tue Jul 25 10:07:15 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.7.0 test/lib/facets/more/test_nackclass.rb