Sha256: 4d22cf08a7d766f86b45af03ad45189a9f5d5e719f70b0c3daf6182b5cc08a85

Contents?: true

Size: 830 Bytes

Versions: 1

Compression:

Stored size: 830 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/more/instance_intercept.rb
#
# Extracted Wed Aug 23 18:22:52 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/more/instance_intercept.rb'


  require 'test/unit'

  class TestModule < Test::Unit::TestCase

    module A

      def f ; "F" ; end
      def g ; "G" ; end

      instance_interception do
        def f( target, *args, &blk )
          '{' + target.super + '}'
        end
        def g( target, *args, &blk )
          '{' + target.super + '}'
        end
      end

    end

    class X
      def f ; super ; end
      include A
      def g ; super ; end
    end

    def test_1_01
      x = X.new
      assert_equal( "{F}", x.f )
      assert_equal( "{G}", x.g )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.7.30 test/lib/facets/more/test_instance_intercept.rb