re: Intro to RSpec in Rails (part 1): Basic Syntax and Strategy for Testing VIEW POST

re: I recommend giving BetterSpecs a read. Where you've placed this code will cause unexpected side-effects. You'll need to wrap it into the lets func...

Thank you for this super-helpful comment Andrew! It was actually perfectly timed--I had an interview for a Rails position earlier this week, and we spent a lot of time pair programming RSpec tests, so I was REALLY THANKFUL to have you put this on my radar so quickly!! :)

I added some comments to the code and the article noting that my variable-creation is not optimal, and directing them to both this comment and the the followup article I just published covering let and context: dev.to/isalevine/intro-to-rspec-in... . I gave you a little shoutout at the bottom too, let me know if you want me to your profile/anything you've written on the subject/anything else!

Again, really appreciate your feedback and guidance! You were absolutely right, BetterSpec is DEFINITELY the resource I needed. <3

code of conduct - report abuse