Module: Twi::Mocking
- Included in:
- Twi
- Defined in:
- lib/twi/mocking.rb
Instance Method Summary collapse
- #conversation ⇒ Object
- #create_message ⇒ Object
- #create_phone ⇒ Object
- #event ⇒ Object
- #message ⇒ Object
- #mock ⇒ Object
- #phone ⇒ Object
Instance Method Details
#conversation ⇒ Object
15 16 17 |
# File 'lib/twi/mocking.rb', line 15 def conversation(...) (@mock ? Mock::Conversation : Conversation).new(...) end |
#create_message ⇒ Object
11 12 13 |
# File 'lib/twi/mocking.rb', line 11 def (...) (...).tap &:create end |
#create_phone ⇒ Object
7 8 9 |
# File 'lib/twi/mocking.rb', line 7 def create_phone(...) phone(...).tap &:create end |
#event ⇒ Object
19 20 21 |
# File 'lib/twi/mocking.rb', line 19 def event(...) (@mock ? Mock::Event : Event).new(...) end |