I have heard that it is a best practice to avoid its, let, let!, specify, before,
and subject
in RSpec.
In regards to let, let!
and before
, how can I perform setup tasks if not using these?
Whoever wrote those best practices actually wants to just say "don't use RSpec". It's insane to avoid using core features and still think you can get things done well. Can you link to these best practices? I'd love to read them and see if they're justified or just some j-random-guy's opinion.
Avoid before
and let
? What? Really?
Avoid specify
, I guess, it's just older syntax for it
.
Avoid a specific subject
call? I guess, if your code lives in an idealistic fantasy land. Strive to minimize it and use implicit subjects? Sure.
Avoid its
? It's awesome! Why avoid it? Self-documenting one-line specs? How horrible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With