Class: RubyPitaya::PostmanSpecHelper
- Inherits:
-
Object
- Object
- RubyPitaya::PostmanSpecHelper
- Defined in:
- lib/rubypitaya/core/spec-helpers/postman_spec_helper.rb
Instance Method Summary collapse
- #bind_session(session) ⇒ Object
-
#initialize ⇒ PostmanSpecHelper
constructor
A new instance of PostmanSpecHelper.
- #push_to_user(uid, message_route, payload) ⇒ Object
Constructor Details
#initialize ⇒ PostmanSpecHelper
Returns a new instance of PostmanSpecHelper.
5 6 7 |
# File 'lib/rubypitaya/core/spec-helpers/postman_spec_helper.rb', line 5 def initialize @postman_mock = nil end |
Instance Method Details
#bind_session(session) ⇒ Object
9 10 11 12 13 |
# File 'lib/rubypitaya/core/spec-helpers/postman_spec_helper.rb', line 9 def bind_session(session) response = @postman_mock&.bind_session(session) response ||= {} response end |
#push_to_user(uid, message_route, payload) ⇒ Object
15 16 17 18 19 |
# File 'lib/rubypitaya/core/spec-helpers/postman_spec_helper.rb', line 15 def push_to_user(uid, , payload) response = @postman_mock&.push_to_user(uid, , payload) response ||= {} response end |