2018-03-04 10:09:32 -05:00
|
|
|
require_relative '../../spec_helper'
|
2020-05-31 12:22:49 -04:00
|
|
|
require_relative 'fixtures/classes'
|
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
|
2020-05-03 06:28:29 -04:00
|
|
|
trace.should.enabled?
|
2017-12-01 10:41:50 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'returns false when current status of the trace is disabled' do
|
2020-05-03 06:28:29 -04:00
|
|
|
TracePoint.new(:line) {}.should_not.enabled?
|
2017-12-01 10:41:50 -05:00
|
|
|
end
|
|
|
|
end
|