class EacRubyUtils::Rspec::SetupManager
Constants
- GEMS_REGISTRY_SUFFIX
Attributes
app_root_path[R]
rspec_config[R]
Public Class Methods
create(app_root_path, rspec_config = nil)
click to toggle source
# File lib/eac_ruby_utils/rspec/setup_manager.rb, line 13 def create(app_root_path, rspec_config = nil) if rspec_config new(app_root_path, rspec_config) else ::RSpec.configure { |new_rspec_config| new(app_root_path, new_rspec_config) } end end
new(app_root_path, rspec_config)
click to toggle source
# File lib/eac_ruby_utils/rspec/setup_manager.rb, line 24 def initialize(app_root_path, rspec_config) @app_root_path = app_root_path.to_pathname @rspec_config = rspec_config include_registry end
Public Instance Methods
gems_registry()
click to toggle source
@return [EacRubyUtils::GemsRegistry]
# File lib/eac_ruby_utils/rspec/setup_manager.rb, line 31 def gems_registry @gems_registry ||= ::EacRubyUtils::GemsRegistry.new(GEMS_REGISTRY_SUFFIX) end
Protected Instance Methods
include_gem_registered(registered_module)
click to toggle source
@param gem [EacRubyUtils::GemsRegistry::Gem]
# File lib/eac_ruby_utils/rspec/setup_manager.rb, line 44 def include_gem_registered(registered_module) extend(registered_module) end
include_registry()
click to toggle source
# File lib/eac_ruby_utils/rspec/setup_manager.rb, line 37 def include_registry gems_registry.registered.each do |gem| include_gem_registered(gem.registered_module) end end