before(:context) 范围是否进入 children 上下文?

Does before(:context) scoping go into children contexts?

在下面的代码示例中,before block 运行 是否在 parent 和子上下文之前,因此是 3 次?

或者只是 parent,因此是 1 次?

即范围有多深?

    describe "my spec class" do

       before(:context) do
           do stuff
       end



       context "parent context" do
          context "subcontext" do
            stuff...
          end 

         context "subcontext" do
            stuff.....
         end
       end

感谢您的帮助。

它应该在组中的所有示例之前 运行 一次。并可由嵌套上下文访问。 几个值得检查的链接:

Nested Context

Before and After hooks