Add webmock to intercept real http connections during tests
Intercepting real http connections also allows running the test suite without an internet connection.
This commit is contained in:
parent
d478f94239
commit
6bc488a983
3 changed files with 12 additions and 1 deletions
1
Gemfile
1
Gemfile
|
@ -101,6 +101,7 @@ group :test do
|
|||
gem "rubocop"
|
||||
gem "timecop"
|
||||
gem "minitest", "~> 5.1", :platforms => [:ruby_19, :ruby_20]
|
||||
gem "webmock"
|
||||
end
|
||||
|
||||
# Needed in development as well so rake can see konacha tasks
|
||||
|
|
11
Gemfile.lock
11
Gemfile.lock
|
@ -75,6 +75,8 @@ GEM
|
|||
term-ansicolor (~> 1.3)
|
||||
thor (~> 0.19.1)
|
||||
tins (>= 1.6.0, < 2)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
crass (1.0.2)
|
||||
dalli (2.7.6)
|
||||
deadlock_retry (1.2.0)
|
||||
|
@ -94,6 +96,7 @@ GEM
|
|||
geoip (1.6.2)
|
||||
globalid (0.3.7)
|
||||
activesupport (>= 4.1.0)
|
||||
hashdiff (0.3.0)
|
||||
hashie (3.4.6)
|
||||
htmlentities (4.3.4)
|
||||
http_accept_language (2.0.5)
|
||||
|
@ -257,6 +260,7 @@ GEM
|
|||
unicode-display_width (~> 1.0, >= 1.0.1)
|
||||
ruby-openid (2.7.0)
|
||||
ruby-progressbar (1.8.1)
|
||||
safe_yaml (1.0.4)
|
||||
sanitize (4.4.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.4.4)
|
||||
|
@ -298,6 +302,10 @@ GEM
|
|||
validates_email_format_of (1.6.3)
|
||||
i18n
|
||||
vendorer (0.1.16)
|
||||
webmock (1.24.2)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff
|
||||
websocket-driver (0.6.4)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.2)
|
||||
|
@ -359,6 +367,7 @@ DEPENDENCIES
|
|||
uglifier (>= 1.3.0)
|
||||
validates_email_format_of (>= 1.5.1)
|
||||
vendorer
|
||||
webmock
|
||||
|
||||
BUNDLED WITH
|
||||
1.10.6
|
||||
1.11.2
|
||||
|
|
|
@ -4,6 +4,7 @@ Coveralls.wear!("rails")
|
|||
ENV["RAILS_ENV"] = "test"
|
||||
require File.expand_path("../../config/environment", __FILE__)
|
||||
require "rails/test_help"
|
||||
require "webmock/minitest"
|
||||
load "composite_primary_keys/fixtures.rb"
|
||||
|
||||
module ActiveSupport
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue