Sha256: 89bf8aceca0078254b8f1bff8aed5f29bb83bdd6552c3c607e8eac906cc8df17

Contents?: true

Size: 893 Bytes

Versions: 10

Compression:

Stored size: 893 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
      start_sinatra_app(:port => 7777) 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', '/', 7777)
      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

10 entries across 10 versions & 3 rubygems

Version Path
dwolla_swagger-1.0.6 vendor/bundle/ruby/2.2.0/gems/vcr-2.9.3/features/cassettes/naming.feature
vcr-2.9.3 features/cassettes/naming.feature
vcr-2.9.2 features/cassettes/naming.feature
vcr-2.9.1 features/cassettes/naming.feature
vcr-2.9.0 features/cassettes/naming.feature
social_url_stats-0.0.1 vendor/ruby/1.9.1/gems/vcr-2.8.0/features/cassettes/naming.feature
vcr-2.8.0 features/cassettes/naming.feature
vcr-2.7.0 features/cassettes/naming.feature
vcr-2.6.0 features/cassettes/naming.feature
vcr-2.5.0 features/cassettes/naming.feature