aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/tracepoint/method_id_spec.rb
blob: 4b18ba696d93050fb8a5632043532e7000e89b3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require File.expand_path('../../../spec_helper', __FILE__)

describe 'TracePoint#method_id' do
  def test; end

  it 'returns the name at the definition of the method being called' do
    method_name = nil
    TracePoint.new(:call) { |tp| method_name = tp.method_id}.enable do
      test
      method_name.should equal(:test)
    end
  end
end