Class: Tochtli::Test::TestQueue

Inherits:
Object
  • Object
show all
Defined in:
lib/tochtli/test/test_case.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel, name, options) ⇒ TestQueue

Returns a new instance of TestQueue.



123
124
125
126
127
# File 'lib/tochtli/test/test_case.rb', line 123

def initialize(channel, name, options)
  @name    = name
  @channel = channel
  @options = options
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



121
122
123
# File 'lib/tochtli/test/test_case.rb', line 121

def channel
  @channel
end

#nameObject (readonly)

Returns the value of attribute name.



121
122
123
# File 'lib/tochtli/test/test_case.rb', line 121

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



121
122
123
# File 'lib/tochtli/test/test_case.rb', line 121

def options
  @options
end

#routing_keyObject (readonly)

Returns the value of attribute routing_key.



121
122
123
# File 'lib/tochtli/test/test_case.rb', line 121

def routing_key
  @routing_key
end

Instance Method Details

#bind(exchange, options) ⇒ Object



129
130
131
# File 'lib/tochtli/test/test_case.rb', line 129

def bind(exchange, options)
  @routing_key = options[:routing_key]
end

#subscribe(*args) ⇒ Object



133
134
135
# File 'lib/tochtli/test/test_case.rb', line 133

def subscribe(*args)
  TestConsumer.new
end

#subscribe_with(*args) ⇒ Object



137
138
139
# File 'lib/tochtli/test/test_case.rb', line 137

def subscribe_with(*args)
  TestConsumer.new
end