RSpec Rails can automatically mix in different behaviors to your tests based on their type
tag, for example enabling you to call get
and
post
in specs with the tag type: :request
.
Alternatively you can skip these tags by setting the config config.infer_spec_type_from_file_location!
in the spec_helper.rb
. This will automatically choose the right type context based on the
file location
Show archive.org snapshot
of the test.
For instance, specs in spec/features/requests
are automatically tagged with { type: :request }
.
Posted by Emanuel to makandra dev (2021-12-21 12:44)