blob: 82254d129927e4cbb5d367e03db62f5133c31a23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
require_relative '../../spec_helper'
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
|