Class: EacRubyUtils::Rspec::SetupManager
- Defined in:
- lib/eac_ruby_utils/rspec/setup_manager.rb
Constant Summary collapse
- GEMS_REGISTRY_SUFFIX =
'Rspec::Setup'
Instance Attribute Summary collapse
-
#app_root_path ⇒ Object
readonly
Returns the value of attribute app_root_path.
-
#rspec_config ⇒ Object
readonly
Returns the value of attribute rspec_config.
Class Method Summary collapse
Instance Method Summary collapse
- #gems_registry ⇒ EacRubyUtils::GemsRegistry
-
#initialize(app_root_path, rspec_config) ⇒ SetupManager
constructor
A new instance of SetupManager.
Constructor Details
#initialize(app_root_path, rspec_config) ⇒ SetupManager
Returns a new instance of SetupManager.
24 25 26 27 28 |
# 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 |
Instance Attribute Details
#app_root_path ⇒ Object (readonly)
Returns the value of attribute app_root_path.
22 23 24 |
# File 'lib/eac_ruby_utils/rspec/setup_manager.rb', line 22 def app_root_path @app_root_path end |
#rspec_config ⇒ Object (readonly)
Returns the value of attribute rspec_config.
22 23 24 |
# File 'lib/eac_ruby_utils/rspec/setup_manager.rb', line 22 def rspec_config @rspec_config end |
Class Method Details
.create(app_root_path, rspec_config = nil) ⇒ Object
13 14 15 16 17 18 19 |
# 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 |
Instance Method Details
#gems_registry ⇒ EacRubyUtils::GemsRegistry
31 32 33 |
# File 'lib/eac_ruby_utils/rspec/setup_manager.rb', line 31 def gems_registry @gems_registry ||= ::EacRubyUtils::GemsRegistry.new(GEMS_REGISTRY_SUFFIX) end |