Avoid loading unneeded files while testing gears

This avoids having to stub out the CARTO code referenced from Gear code
that is not being tested
pull/12019/head
Javier Torres 8 years ago
parent bc1c81273b
commit 2861644154

@ -3,6 +3,11 @@ module CartoGearsApi
isolate_namespace CartoGearsApi isolate_namespace CartoGearsApi
lib_path = config.root.join('lib').to_s lib_path = config.root.join('lib').to_s
config.eager_load_paths << lib_path unless config.eager_load_paths.include?(lib_path) if Rails.env.test?
# In test environment, only load the required files to avoid including stuff with dependencies to CARTO
config.autoload_paths << lib_path
else
config.eager_load_paths << lib_path unless config.eager_load_paths.include?(lib_path)
end
end end
end end

@ -1,4 +0,0 @@
module CartoDB
module ConfigUtils
end
end

@ -1,6 +0,0 @@
module Carto
class Notification
ICON_ALERT = 'alert'.freeze
ICON_SUCCESS = 'success'.freeze
end
end

@ -1,7 +0,0 @@
class Carto::UserCreation
CREATED_VIA_SAML = 'saml'.freeze
CREATED_VIA_LDAP = 'ldap'.freeze
CREATED_VIA_ORG_SIGNUP = 'org_signup'.freeze
CREATED_VIA_API = 'api'.freeze
CREATED_VIA_HTTP_AUTENTICATION = 'http_authentication'.freeze
end
Loading…
Cancel
Save