Sha256: cad0b47fd6e75bf999097368a387b47e949628acf744e2c2a0f63c74dc16c005

Contents?: true

Size: 1008 Bytes

Versions: 1

Compression:

Stored size: 1008 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facet/kernel/methods.rb
#
# Extracted Wed Jan 25 11:25:39 EST 2006
# Unit Tools Reap Test Extractor
#

require 'facet/kernel/methods.rb'


  require 'test/unit'

  class TC_Methods < Test::Unit::TestCase

    class O
      def a ; end
    end
    $o = O.new

    # get a hold of the original definition _before require_
    $imF = $o.method( :methods )

    def test_instance_methods
      assert_equal( $imF.call.sort, $o.methods )
    end

    def test_public_instance_methods
      assert_equal( $o.public_methods.sort, $o.methods(:public) )
    end

    def test_private_instance_methods
      assert_equal( $o.private_methods.sort, $o.methods(:private) )
    end

    def test_protected_instance_methods
      assert_equal( $o.protected_methods.sort, $o.methods(:protected) )
    end

    def test_local_instance_methods
      assert_equal( ["a"], $o.methods(:local) )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.0.3 packages/core/test/lib/facet/kernel/test_methods.rb