Sha256: adab40c02e079f7e6a824d6fd7d7d1d3963aedfab55dd031420ab298beebe315

Contents?: true

Size: 1006 Bytes

Versions: 1

Compression:

Stored size: 1006 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/nano/kernel/methods.rb
#
# Extracted Fri Oct 28 14:20:18 EDT 2005
# Unit Tools Reap Test Extractor
#

require 'nano/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-0.9.0 test/lib/nano/kernel/test_methods.rb