pdksync_heads/master-0-g7827fc2

This commit is contained in:
Erick Banks
2019-06-10 13:35:53 +01:00
parent bcc6263e14
commit 4e36ff899c
7 changed files with 26 additions and 23 deletions

View File

@@ -42,6 +42,8 @@ RSpec.configure do |c|
end
end
# Ensures that a module is defined
# @param module_name Name of the module
def ensure_module_defined(module_name)
module_name.split('::').reduce(Object) do |last_module, next_module|
last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false)