这将是与Webmock相同的功能。只不过它用的是磁带而不是琴弦。类似于expect(Webmock)to receive...
expect(Webmock)to receive...
vqlkdk9b1#
这里有一个配置:match_requests_on。默认值为[:method, :uri]
match_requests_on
[:method, :uri]
VCR.configure do |config| config.default_cassette_options[:match_requests_on] = [:method, :uri, :body, :headers] end
https://nicolasiensen.gitbook.io/vcr/configuration/default_cassette_options#match_requests_on-defaults-to-method-uri-when-it-has-not-been-sethttps://nicolasiensen.gitbook.io/vcr/request-matching/body
1条答案
按热度按时间vqlkdk9b1#
这里有一个配置:
match_requests_on
。默认值为
[:method, :uri]
https://nicolasiensen.gitbook.io/vcr/configuration/default_cassette_options#match_requests_on-defaults-to-method-uri-when-it-has-not-been-set
https://nicolasiensen.gitbook.io/vcr/request-matching/body