Add webmock for external requests in tests

external_request.rb needs to be required before lint is run.
This commit is contained in:
Aditya Prakash 2016-02-20 20:08:28 +05:30
parent 640be7497f
commit 6301072484
5 changed files with 47 additions and 1 deletions

View file

@ -1,9 +1,12 @@
require_relative '../../spec/support/external_request'
namespace :factory_girl do
desc "Verify that all FactoryGirl factories are valid"
task lint: :environment do
if Rails.env.test?
begin
DatabaseCleaner.start
mock_commercial_request
FactoryGirl.lint
ensure
DatabaseCleaner.clean