Trouble in testing cucumber with VCR

176 views
Skip to first unread message

rakeshman...@gmail.com

unread,
Jan 31, 2014, 7:17:24 AM1/31/14
to vcr-...@googlegroups.com
I am having trouble in testing cucumber with VCR even after using the VCR it allows the real http requests. I got the following error using vcr

      ================================================================================
      An HTTP request has been made that VCR does not know how to handle:
        GET http://127.0.0.1:48765/__identify__
     
      There is currently no cassette in use. There are a few ways
      you can configure VCR to handle this request:
     
        * If you want VCR to record this request and play it back during future test
          runs, you should wrap your test (or this portion of your test) in a
          `VCR.use_cassette` block [1].
        * If you only want VCR to handle requests made while a cassette is in use,
          configure `allow_http_connections_when_no_cassette = true`. VCR will
          ignore this request since it is made when there is no cassette [2].
        * If you want VCR to ignore this request (and others like it), you can
          set an `ignore_request` callback [3].
     
      [1] https://www.relishapp.com/myronmarston/vcr/v/2-1-1/docs/getting-started
      [2] https://www.relishapp.com/myronmarston/vcr/v/2-1-1/docs/configuration/allow-http-connections-when-no-cassette
      [3] https://www.relishapp.com/myronmarston/vcr/v/2-1-1/docs/configuration/ignore-request
      ================================================================================
     
   My VCR configuration in features/support/env.rb
  
   VCR.configure do |c|
    c.cassette_library_dir = File.join(File.dirname(__FILE__),'fixtures','vcr_cassettes')
    c.hook_into :webmock
    c.ignore_localhost = true
    c.allow_http_connections_when_no_cassette = false
  end
 
  Gem versions list i am using:
  1.   vcr (2.1.1)
  2.   webmock (1.8.7)
  3.   selenium-webdriver (2.32.1)
  4.   cucumber (1.2.0)
  5.   cucumber-rails (1.3.0)

Myron Marston

unread,
Jan 31, 2014, 11:04:46 AM1/31/14
to vcr-...@googlegroups.com, rakeshman...@gmail.com
I've replied in the issue you opened:


In the future, please don't double post to the mailing list and on a github issue.  Your mailing list post didn't immediately show up because posts from new members are moderated so we can prevent spam.

Myron
Reply all
Reply to author
Forward
0 new messages