RSpec Shared Example Groups | DRY Up Your Specs

Published: 19 October 2022
on channel: Brett Codes
633
23

RSpec has a nifty featured called Shared Example Groups that lets you reuse expectations across many specs. This makes your code easier to change, better ensures behavior, and reduces repeated spec code.

It's a feature of RSpec that can take a little bit to get the hang of, but it's extremely useful.

RSpec docs on shared example groups: https://relishapp.com/rspec/rspec-cor...

View the source: https://github.com/brettchalupa/scree...


Watch video RSpec Shared Example Groups | DRY Up Your Specs online without registration, duration hours minute second in high quality. This video was added by user Brett Codes 19 October 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 63 once and liked it 2 people.