Nested Context Blocks in RSpec

Is embedding context blocks inside other context blocks wrong?

For instance:

describe "update_management" do context "with a typical update" do context "when a red flag has been raised" do it "" do end end context "when a yellow flag has been raised" do it "" do end end etc... end end 
+6
source share
1 answer

I highly recommend you check out Better Specs to learn more about best practices for using contexts in RSpec tests. You can also look at the rspec-style-guide to learn more about best practices.

+2
source

All Articles