DEV Community

Discussion on: Why Choose `let` Over instance variables in RSpec

Collapse
 
gumatias profile image
Gustavo Matias

Curious on how you think about describe vs context. In simple terms, how you decide to use one vs the other in different scenarios?

Collapse
 
jeremyf profile image
Jeremy Friesen

I choose "describe" for the thing under test (e.g. describe "#call"). And "context" for the conditionals (e.g. context "when given user is logged in").