Sha256: 0fb955af323523281d9ad50c32c1a71d493aff1dce68c1c0a8d31103bc26aecf
Contents?: true
Size: 671 Bytes
Versions: 2
Compression:
Stored size: 671 Bytes
Contents
#!/usr/bin/env ruby require 'test/unit' require 'ruby-prof' require 'test_helper' module Foo def Foo::hello end end module Bar def Bar::hello Foo::hello end def hello Bar::hello end end include Bar class BasicTest < Test::Unit::TestCase def test_nested_modules result = RubyProf.profile do hello end methods = result.threads.values.first # Length should be 4s assert_equal(4, methods.length) method1 = methods['Bar#hello'] assert_not_nil(method1) method1 = methods['<Module::Bar>#hello'] assert_not_nil(method1) method1 = methods['<Module::Foo>#hello'] assert_not_nil(method1) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruby-prof-0.4.1-mswin32 | test/module_test.rb |
ruby-prof-0.4.1 | test/module_test.rb |