Configuring RSpec for Rails Apps (Test Driven RSpec, Ep 03)

Опубликовано: 31 Октябрь 2024
на канале: Brett Codes
6,732
124

Brett walks through the spec_helper and rails_helper that get generated when installing RSpec in a Rails app.

Code from the episode: https://github.com/brettchalupa/test-...

Support my screencasts by buying me a coffee: https://www.buymeacoffee.com/brettcha...

This episode goes into detail on:

The `.rspec` file
`spec/spec_helper.rb`, its various options, and when to require it
RSpec `spec/examples.txt` and using `--only-failures`
RSpec output formats
RSpec slow test profiling options
RSpec test seed and its importance
`spec/rails_helper.rb`, its various options, and when to require it
Requiring and including `spec/support/` code in specs

Software used:

Ruby 2.4.2
RSpec 3.6.1
Rails 5.1.4
Mac OS
iTerm 2
Vim
Tmux

Let me know if you run into any issues or have any specific topics you'd like covered.

You can purchase the series to view it offline and support the channel: https://gumroad.com/l/test-driven-rspec