I use RSpec for doing TDD, and the rspec-rails gem for integration in Rails projects. On initialising RSpec for SOLDN2, with rspec init it generated the following spec helper (comments removed):
This seemed to be missing some things, notably the loading of the Rails environment. Looking at the readme of the rspec-rails gem, I found that the correct command is actually:
rails generate rspec:install
The file this command generates is much more verbose with instructive comments:
Interestingly this leaves out the focus config options, which allow you to select specific specs to run, e.g: