class ModuleTest

  1. test/module_test.rb
Parent: module_test.rb

Methods

Public Instance

  1. test_nested_modules

Public Instance methods

test_nested_modules ()
[show source]
# File test/module_test.rb, line 28
def test_nested_modules
  result = RubyProf.profile do
    hello
  end

  methods = result.threads.values.first

  # Length should be 5
  assert_equal(5, methods.length)

  # these methods should be in there... (hard to tell order though).
  for name in ['ModuleTest#test_nested_modules','Bar#hello','Kernel#sleep','<Module::Bar>#hello','<Module::Foo>#hello']
    assert methods.map(&:full_name).include?( name )
  end
end