Google MapsRoutingAPIとやり取りする必要のあるCucumber機能がいくつかあります。私はVCRを使用してこれらの相互作用をスタブしようとしています。
私は次のように私の機能にVCRタグを追加しました:
@google_routing_api @javascript
Scenario: Creating a bus
Given I am on the buses page
When I follow "Get Started Now"
そして、私のVCR構成をに追加しました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__