Displaying 1 result from an estimated 1 matches for "do_another_th".
2009 Jul 09
3
before(:all) and nested contexts
...l) do
> ?? ?@variable = some_expensive_operation
> ??end
>
> ??it "should do something" do
> ?? ?@variable.should do_something
> ??end
>
> ??describe "in a specific context" do
> ?? ?it "should do another thing" do
> ?? ? ?@variable.should do_another_thing
> ?? ?end
> ??end
> end
> Worth noting that I''m quite happy to give up the ability to have before
> blocks in the sub-contexts in order to ensure that the expensive operation
> is only run once...
> Your thoughts most welcome... (including, perhaps, telling me that...