我有一些需要与 Google Maps Routing API 交互的 Cucumber 功能。我正在尝试使用VCR消除这些交互。
我在我的功能中添加了一个 VCR 标签,如下所示:
@google_routing_api @javascript
Scenario: Creating a bus
Given I am on the buses page
When I follow "Get Started Now"
然后添加我的录像机配置features/support/vcr.rb
require 'vcr'
VCR.config do |c|
# INFO: This is relative to the Rails.root
c.cassette_library_dir = 'features/fixtures/vcr_cassettes'
c.stub_with :fakeweb
end
# INFO: https://github.com/myronmarston/vcr/wiki/Usage-with-Cucumber
VCR.cucumber_tags do |t|
t.tag '@google_routing_api'
end
但是当我运行我的杯子时,我被告知..
Real HTTP connections are disabled. Unregistered request: GET http://127.0.0.1:54181/__identify__