Class: Mocktail::RegistersStubbing
- Inherits:
-
Object
- Object
- Mocktail::RegistersStubbing
- Extended by:
- T::Sig
- Defined in:
- lib/mocktail/registers_stubbing.rb,
lib/mocktail/sorbet/mocktail/registers_stubbing.rb
Instance Method Summary collapse
-
#initialize ⇒ RegistersStubbing
constructor
A new instance of RegistersStubbing.
- #register(demonstration, demo_config) ⇒ Object
Constructor Details
#initialize ⇒ RegistersStubbing
Returns a new instance of RegistersStubbing.
7 8 9 |
# File 'lib/mocktail/registers_stubbing.rb', line 7 def initialize @records_demonstration = RecordsDemonstration.new end |
Instance Method Details
#register(demonstration, demo_config) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/mocktail/registers_stubbing.rb', line 11 def register(demonstration, demo_config) Stubbing.new( demonstration: demonstration, demo_config: demo_config, recording: @records_demonstration.record(demonstration, demo_config) ).tap do |stubbing| Mocktail.cabinet.store_stubbing(stubbing) end end |