File tree 3 files changed +6
-1
lines changed
generators/cypress_on_rails/templates/config/initializers
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`
394
394
c.vcr_options = {
395
395
hook_into: :webmock ,
396
396
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" )
397
399
}
398
400
```
399
401
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ def vcr
11
11
end
12
12
13
13
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
15
17
end
16
18
17
19
private
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ if defined?(CypressOnRails)
12
12
# c.vcr_options = {
13
13
# hook_into: :webmock,
14
14
# default_cassette_options: { record: :once },
15
+ # cassette_library_dir: File.expand_path("#{__dir__}/../../<%= options.install_folder %> /<%= options.framework %> /fixtures/vcr_cassettes")
15
16
# }
16
17
c.logger = Rails.logger
17
18
You can’t perform that action at this time.
0 commit comments