Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Heroku CI-VCR-Rspec-未用于我的Rspec测试的夹具_Ruby On Rails_Heroku_Continuous Integration_Vcr_Heroku Ci - Fatal编程技术网

Ruby on rails Heroku CI-VCR-Rspec-未用于我的Rspec测试的夹具

Ruby on rails Heroku CI-VCR-Rspec-未用于我的Rspec测试的夹具,ruby-on-rails,heroku,continuous-integration,vcr,heroku-ci,Ruby On Rails,Heroku,Continuous Integration,Vcr,Heroku Ci,我正在使用VCR gem,它记录大量http请求,并将它们保存为fixture/VCR_磁带中的fixture 它在本地工作得很好,但是当我在Heroku上部署时,似乎没有使用fixture,测试使用的是真正的http请求,这不是预期的行为 我的问题是:“app.json”中是否有一个特殊的配置,或者我需要添加一个特殊的配置来要求我的CI运行fixture而不是真正的http请求 app.json "environments": { "test": { "env": { ..

我正在使用VCR gem,它记录大量http请求,并将它们保存为fixture/VCR_磁带中的fixture

它在本地工作得很好,但是当我在Heroku上部署时,似乎没有使用fixture,测试使用的是真正的http请求,这不是预期的行为

我的问题是:“app.json”中是否有一个特殊的配置,或者我需要添加一个特殊的配置来要求我的CI运行fixture而不是真正的http请求

app.json

"environments": {
    "test": {
      "env": {
..........
      },
      "addons": ["heroku-postgresql:in-dyno", "heroku-redis:in-dyno"],
      "scripts":
        {
          "test-setup": "bundle exec rake db:seed",
          "test": "bundle exec rspec" 
        }
    } 
spec_helper.rb

VCR.configure do |config|
  config.cassette_library_dir = "./fixtures/vcr_cassettes"
  config.hook_into :webmock
  config.allow_http_connections_when_no_cassette = true
end