RSpec spec_helper vs rails_helper Explained

Published: 03 October 2022
on channel: Brett Codes
805
25

When you initialize RSpec in a Rails project, you get two files: spec/spec_helper.rb and spec/rails_helper.rb. They serve two different purposes and which one you require can have a drastic impact on your test speeds. In this video, I explain why that is, when to require each, and ways to keep your tests fast.

View the source for this episode: https://github.com/brettchalupa/scree...

Companion blog post: https://code.brettchalupa.com/spec_he...

Versions used:
Ruby 3.1.1
Rails 7.0.04


Watch video RSpec spec_helper vs rails_helper Explained online without registration, duration hours minute second in high quality. This video was added by user Brett Codes 03 October 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 80 once and liked it 2 people.