/vendor/gems/facets-2.4.5/test/more/test_1stclassmethod.rb
Ruby | 21 lines | 15 code | 6 blank | 0 comment | 0 complexity | 173c5af38840a27f53a45c68d86d177a MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
- require 'test/unit'
- require 'facets/1stclassmethod'
- class Test1stClassMethod < Test::Unit::TestCase
- class TestWith
- def foo ; end
- end
- def test_method!
- t = TestWith.new
- assert_equal( t.method!(:foo).__id__, t.method!(:foo).__id__ )
- assert_not_equal( t.method(:foo).__id__, t.method(:foo).__id__ )
- end
- def test_this
- assert_equal( this, method(:test_this) )
- end
- end