官术网_书友最值得收藏!

Getting ready

We'll use the webmock gem for stubbing out external HTTP requests in our tests, so update your monolith gemfile to include the webmock gem in the test group:

group :test do
# ...
gem 'webmock'
end

You should also update spec/spec_helper.rb to disable external network requests. That will keep you honest when writing the rest of your test code:

require 'webmock/rspec'
WebMock.disable_net_connect!(allow_localhost: false)
主站蜘蛛池模板: 广安市| 江安县| 北安市| 旺苍县| 四子王旗| 泌阳县| 启东市| 左云县| 达孜县| 时尚| 玉树县| 泸水县| 溧阳市| 共和县| 凤山县| 梅河口市| 会泽县| 辽阳县| 永兴县| 金坛市| 淮南市| 新密市| 青铜峡市| 华阴市| 壤塘县| 自贡市| 和政县| 大同市| 巴里| 广水市| 柏乡县| 新巴尔虎左旗| 木里| 铜川市| 昌黎县| 忻州市| 永年县| 余庆县| 汶上县| 牙克石市| 宁河县|