This chapter discusses support code to set tests up and clean up after them. Initialization, configuration, cleanup, and other support code related to RSpec specs are important in real-world RSpec usage. We will learn how to cleanly organize support code in real-world applications by learning about the following topics:
Configuring RSpec with
spec_helper.rb
Initialization and configuration of resources
Preventing tests from accessing the Internet with WebMock
Maintaining clean test state
Custom helper code
Loading support code on demand with tags