Sha256: 5e34e39f13900e546d9519c8c38b72ba6086aa961307467f43a10efa5cd0917f

Contents?: true

Size: 842 Bytes

Versions: 3

Compression:

Stored size: 842 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.  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 :fakeweb
      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 "body: Hello"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vcr-2.0.0.rc1 features/cassettes/naming.feature
vcr-2.0.0.beta2 features/cassettes/naming.feature
vcr-2.0.0.beta1 features/cassettes/naming.feature