Sha256: b5b03ded8c50c6498e86e7d85059db2e792d2015ab53e5cccc9f079347b1d99f

Contents?: true

Size: 896 Bytes

Versions: 57

Compression:

Stored size: 896 Bytes

Contents

Feature: Naming

  When inserting or using a cassette, the first argument is the cassette name.
  You can use any string for the name.  If you use the default `:file_system`
  storage backend, VCR will sanitize the string before using it as a file name,
  so that it is a file-system friendly file name.

  Scenario: Name sanitizing
    Given a file named "name_sanitizing.rb" with:
      """ruby
      $server = start_sinatra_app do
        get('/') { "Hello" }
      end

      require 'vcr'

      VCR.configure do |c|
        c.cassette_library_dir = 'cassettes'
        c.hook_into :webmock
      end

      VCR.use_cassette('Fee, Fi Fo Fum') do
        Net::HTTP.get_response('localhost', '/', $server.port)
      end
      """
     And the directory "cassettes" does not exist
    When I run `ruby name_sanitizing.rb`
    Then the file "cassettes/Fee_Fi_Fo_Fum.yml" should contain "Hello"

Version data entries

57 entries across 57 versions & 7 rubygems

Version Path
cloudsmith-api-2.0.15 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.14 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.13 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.12 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.11 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.10 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.9 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.8 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.7 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.6 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.5 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.4 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.2 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.1 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-2.0.0 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-1.142.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-1.120.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-1.61.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature
cloudsmith-api-1.42.3 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/cassettes/naming.feature