https://www.rubydoc.info/github/rspec/rspec-core/RSpec%2FCor...
And it suggests using let (instead of the better let!) which when chained makes the execution of the code incredibly unpredictable for a human.
I suggest sticking only to instance variables and before blocks, so that overriding lets is not a practice that appear in your system and also won't push you toward abstracting your tests too much in an effort to improve performance
It omits entirely the warning and says "use this when assigning variable". Yeah you can make an argument either way, but given how dogmatic this website is, it's literally pushing toward using let. The consequence is that you get tests written with let everywhere.
I would outright say do NOT use let, like at all, your tests will be better without them:
- A test abstraction could live in the actual code so that it's properly tested, it's plain ruby and can be used by other developers wanting to test code related to yours
- A test will have all the setup close to its execution phase, making it easier to read
- Instance variables override don't exist