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
30 31 32 |
# File 'lib/active_mocker/loaded_mocks.rb', line 30 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}>
15 16 17 18 19 |
# File 'lib/active_mocker/loaded_mocks.rb', line 15 def mocks Collection.new(mocks_store.values.each_with_object({}) do |mock_constant, hash| hash[mock_constant.send(:mocked_class)] = mock_constant end) end |