Question: This is totally stupid and unimportant, but I'm just curious: using [RSpec](http://rspec.info/), can I somehow access what "depth" of scope I'm in? That is...

```
describe SomeClass do
  describe "#some_method" do
    context "within some context" do
      it "is possible, what I'm asking" do
        # Actually, I'm not entirely sure what I'd expect this
        # value to be... basically, whatever the RSpec designers
        # felt made sense.
        mysterious_method_to_get_depth.should == 3
      end
    end
  end
end

```

I'm actually asking because I want to output some useful information, but in such a way that the test output is still maximally readable (i.e., with the proper indentation).

Answer: 
Within your examples, you can use `example.metadata`, which is a hash that provides a ton of info.
Following the suggestion by @Myron Marston, I implemented something like this:

```
def mysterious_method_to_get_depth(meta)
    if !meta.has_key?(:example_group)
        0
    else
        1 + mysterious_method_to_get_depth(meta[:example_group])
    end
end

```

You should call it like this: `mysterious_method_to_get_depth(example.metadata)`

Another solution is to customize DocumentationFormatter: <https://stackoverflow.com/a/23446897/659788>