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
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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
function.If the code reads exactly as it does you can omit the descriptions:
You'll likely want to use
context
.Another resource to read
Here are adjustments (I didn't add the context since I didn't have time to think about the code):
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
andcontext
: 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