2018-03-04 15:09:32 +00:00
|
|
|
require_relative '../../spec_helper'
|
2017-12-01 15:41:50 +00:00
|
|
|
|
|
|
|
describe 'TracePoint#lineno' do
|
|
|
|
it 'returns the line number of the event' do
|
|
|
|
lineno = nil
|
|
|
|
TracePoint.new(:line) { |tp| lineno = tp.lineno }.enable do
|
|
|
|
lineno.should == 7
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|