File: //usr/local/rvm/src/ruby-2.6.8/spec/ruby/core/thread/backtrace/location/base_label_spec.rb
require_relative '../../../../spec_helper'
require_relative 'fixtures/classes'
describe 'Thread::Backtrace::Location#base_label' do
before :each do
@frame = ThreadBacktraceLocationSpecs.locations[0]
end
it 'returns the base label of the call frame' do
@frame.base_label.should == '<top (required)>'
end
describe 'when call frame is inside a block' do
before :each do
@frame = ThreadBacktraceLocationSpecs.block_location[0]
end
it 'returns the name of the method that contains the block' do
@frame.base_label.should == 'block_location'
end
end
end