class Qs::TestClient
Constants
- PushedItem
Attributes
pushed_items[R]
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
Qs::Client::new
# File lib/qs/client.rb, line 145 def initialize(*args) super @redis = HellaRedis.mock(self.redis_connect_hash) @pushed_items = [] end
Public Instance Methods
push(queue_name, payload_hash)
click to toggle source
# File lib/qs/client.rb, line 151 def push(queue_name, payload_hash) # attempt to encode (and then throw away) the payload hash, this will # error on the developer if it can't be encoded Qs.encode(payload_hash) @pushed_items << PushedItem.new(queue_name, payload_hash) end
reset!()
click to toggle source
# File lib/qs/client.rb, line 158 def reset! @pushed_items.clear end
Private Instance Methods
enqueue!(queue, job)
click to toggle source
# File lib/qs/client.rb, line 164 def enqueue!(queue, job) # attempt to serialize (and then throw away) the job, this will error on # the developer if it can't serialize the job Qs::Payload.serialize(job) queue.enqueued_jobs << job end