diff --git a/Gemfile b/Gemfile index cf30d1d96..d194a017c 100644 --- a/Gemfile +++ b/Gemfile @@ -63,6 +63,7 @@ group :test do gem 'simplecov', require: false, group: :test # gem 'simplecov-console' gem 'selenium-webdriver' + gem 'database_cleaner' end group :test, :development do diff --git a/Gemfile.lock b/Gemfile.lock index 41a7aef60..aadaec462 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -839,6 +839,7 @@ GEM css_parser (1.7.0) addressable dalli (2.7.9) + database_cleaner (1.7.0) dbf (2.0.13) fastercsv (~> 1.5) devise (4.6.2) @@ -1132,6 +1133,7 @@ DEPENDENCIES coffee-rails (~> 4.2.2) comfortable_mexican_sofa (= 1.12.10) dalli (~> 2.7.2) + database_cleaner dbf (~> 2.0.7) devise (~> 4.6.2) dotenv (~> 0.11.1) @@ -1175,4 +1177,4 @@ DEPENDENCIES will_paginate (~> 3.0) BUNDLED WITH - 1.17.2 + 1.17.3 diff --git a/test/test_helper.rb b/test/test_helper.rb index f434409c0..604e53e65 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -13,6 +13,9 @@ require 'mocha/mini_test' require 'webmock/minitest' + +require 'database_cleaner' + WebMock.disable_net_connect!(:allow => ["codeclimate.com"], :allow_localhost => true) Mocha::Configuration.prevent(:stubbing_non_existent_method)