Sha256: 891f70aa177a2da553c4a83a5e3334c90ff7ad41811f9b7c94bb7d4d44f19a4d

Contents?: true

Size: 899 Bytes

Versions: 4

Compression:

Stored size: 899 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:
      """
      require 'vcr_cucumber_helpers'

      start_sinatra_app(:port => 7777) do
        get('/') { "Hello" }
      end

      require 'vcr'

      VCR.config do |c|
        c.cassette_library_dir = 'cassettes'
        c.stub_with :fakeweb
      end

      VCR.use_cassette('Fee, Fi Fo Fum', :record => :new_episodes) 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

4 entries across 4 versions & 1 rubygems

Version Path
vcr-1.11.1 features/cassettes/naming.feature
vcr-1.10.3 features/cassettes/naming.feature
vcr-1.10.2 features/cassettes/naming.feature
vcr-1.10.0 features/cassettes/naming.feature