File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
generators/cypress_on_rails/templates/config/initializers Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -394,6 +394,8 @@ Add your VCR configuration to your `config/cypress_on_rails.rb`
394394c.vcr_options = {
395395 hook_into: :webmock ,
396396 default_cassette_options: { record: :once },
397+ # It's possible to override cassette_library_dir using install_folder
398+ cassette_library_dir: File .expand_path(" #{ __dir__ } /../../spec/cypress/fixtures/vcr_cassettes" )
397399}
398400```
399401
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ def vcr
1111 end
1212
1313 def cassette_library_dir
14- "#{ configuration . install_folder } /fixtures/vcr_cassettes"
14+ configuration . vcr_options &.fetch ( :cassette_library_dir ) do
15+ "#{ configuration . install_folder } /fixtures/vcr_cassettes"
16+ end
1517 end
1618
1719 private
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ if defined?(CypressOnRails)
1212 # c.vcr_options = {
1313 # hook_into: :webmock,
1414 # default_cassette_options: { record: :once },
15+ # cassette_library_dir: File.expand_path("#{__dir__}/../../<%= options.install_folder %> /<%= options.framework %> /fixtures/vcr_cassettes")
1516 # }
1617 c.logger = Rails.logger
1718
You can’t perform that action at this time.
0 commit comments