I was just reading rspec cheat sheet. One thing it mentioned was be careful with let/let!. I read the description but still don’t get why. Can anyone give an example? Alternatively, what should I do? Should I setup all objects in the factories file?
Thanks. This post is really helpful. My biggest take-away is one should make setup logic clear within each test so that we know exactly what assumptions we are making (addressing the mystery guest problem).
If somewhere were to significantly touch this spec (which as you can see from the blame, hasn’t really happened), they would have license to rewrite the spec for the code they were touching to match the new style, but we wouldn’t change code to match a new style that we aren’t touching.