The "vcr.rb" spec helper in this gist will create cassettes with readable filename structures. It aims to avoid extremely long filenames for cassets that can break Docker builds.
For example:
# spec/features/life/quotes_widget_spec.rb
describe 'Life quotes widget', :vcr do
context 'when the user knows their coverage amount' do
it 'redirects to the health navigator' do
# ...
end
end
context 'when the user does not know their coverage amount' do
it 'redirects to the coverage navigator' do
# ...
end
it 'saves the foo and the bar' do
# ...
end
end
endWill generate cassettes:
spec/
cassettes/
life_quotes_widget/
when_the_user_knows_their_coverage_amount/
redirects_to_the_health_navigator.yml
when_the_user_does_not_know_their_coverage_amount/
redirects_to_the_coverage_navigator.yml
saves_the_foo_and_the_bar.yml