diff options
Diffstat (limited to 'spec/ruby/core/thread')
| -rw-r--r-- | spec/ruby/core/thread/backtrace/location/base_label_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/core/thread/backtrace/location/base_label_spec.rb b/spec/ruby/core/thread/backtrace/location/base_label_spec.rb index d7302c26be..139a68e2c8 100644 --- a/spec/ruby/core/thread/backtrace/location/base_label_spec.rb +++ b/spec/ruby/core/thread/backtrace/location/base_label_spec.rb @@ -9,4 +9,14 @@ describe 'Thread::Backtrace::Location#base_label' do 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 |
