Class: ActiveMocker::LoadedMocks
- Inherits:
-
Object
- Object
- ActiveMocker::LoadedMocks
- Extended by:
- Forwardable
- Defined in:
- lib/active_mocker/loaded_mocks.rb,
lib/active_mocker/loaded_mocks/features.rb
Defined Under Namespace
Classes: Collection, Features
Class Method Summary collapse
- .features ⇒ Object
-
.mocks ⇒ Object
(also: class_name_to_mock, all)
Returns an Enumerable of all currently loaded mocks.
Class Method Details
.features ⇒ Object
32 33 34 |
# File 'lib/active_mocker/loaded_mocks.rb', line 32 def features @features ||= Features.instance end |
.mocks ⇒ Object Also known as: class_name_to_mock, all
Returns an Enumerable of all currently loaded mocks.
ActiveMocker::LoadedMocks.mocks
=> <Collection @hash: {'Person' => PersonMock}>
17 18 19 20 21 |
# File 'lib/active_mocker/loaded_mocks.rb', line 17 def mocks Collection.new(mocks_store.values.each_with_object({}) do |mock_constant, hash| hash[mock_constant.send(:mocked_class)] = mock_constant end) end |