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

describe 'TracePoint#enabled?' do
  it 'returns true when current status of the trace is enable' do
    trace = TracePoint.new(:call) {}
    trace.enable do
      trace.enabled?.should be_true
    end
  end

  it 'returns false when current status of the trace is disabled' do
    TracePoint.new(:call) {}.enabled?.should be_false
  end
end