2018-03-04 10:09:32 -05:00
|
|
|
require_relative '../../spec_helper'
|
2017-12-01 10:41:50 -05:00
|
|
|
|
|
|
|
describe 'TracePoint#enabled?' do
|
|
|
|
it 'returns true when current status of the trace is enable' do
|
2019-02-21 10:38:59 -05:00
|
|
|
trace = TracePoint.new(:line) {}
|
2017-12-01 10:41:50 -05:00
|
|
|
trace.enable do
|
2019-02-21 10:38:59 -05:00
|
|
|
trace.enabled?.should == true
|
2017-12-01 10:41:50 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'returns false when current status of the trace is disabled' do
|
2019-02-21 10:38:59 -05:00
|
|
|
TracePoint.new(:line) {}.enabled?.should == false
|
2017-12-01 10:41:50 -05:00
|
|
|
end
|
|
|
|
end
|