diff options
Diffstat (limited to 'spec/ruby/core/tracepoint/method_id_spec.rb')
| -rw-r--r-- | spec/ruby/core/tracepoint/method_id_spec.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/ruby/core/tracepoint/method_id_spec.rb b/spec/ruby/core/tracepoint/method_id_spec.rb index 82254d1299..67740f2d7d 100644 --- a/spec/ruby/core/tracepoint/method_id_spec.rb +++ b/spec/ruby/core/tracepoint/method_id_spec.rb @@ -1,13 +1,15 @@ require_relative '../../spec_helper' +require_relative 'fixtures/classes' 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) + TracePoint.new(:call) { |tp| + next unless TracePointSpec.target_thread? + method_name = tp.method_id + }.enable do + TracePointSpec.test + method_name.should.equal?(:test) end end end |
