class BasicTest

  1. test/basic_test.rb
Parent: basic_test.rb

Public Instance methods

setup ()
[show source]
# File test/basic_test.rb, line 5
def setup
  # Need to use wall time for this test due to the sleep calls
  RubyProf::measure_mode = RubyProf::WALL_TIME
end
test_double_profile ()
[show source]
# File test/basic_test.rb, line 18
def test_double_profile
  RubyProf.start
  assert_raise(RuntimeError) do
    RubyProf.start
  end
  RubyProf.stop
end
test_no_block ()
[show source]
# File test/basic_test.rb, line 26
def test_no_block
  assert_raise(ArgumentError) do
    RubyProf.profile
  end
end
test_running ()
[show source]
# File test/basic_test.rb, line 10
def test_running
  assert(!RubyProf.running?)
  RubyProf.start
  assert(RubyProf.running?)
  RubyProf.stop
  assert(!RubyProf.running?)
end
test_traceback ()
[show source]
# File test/basic_test.rb, line 32
def test_traceback
  RubyProf.start
  assert_raise(NoMethodError) do
    RubyProf.xxx
  end

  RubyProf.stop
end