Class: BunnyMock

Inherits:
Object
  • Object
show all
Defined in:
lib/bunny_mock.rb,
lib/bunny_mock/version.rb

Defined Under Namespace

Classes: Channel, Consumer, Exchange, Queue

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#channelsObject



17
18
19
# File 'lib/bunny_mock.rb', line 17

def channels
  @channels ||= []
end

#create_channelObject



21
22
23
# File 'lib/bunny_mock.rb', line 21

def create_channel
  Channel.new.tap{|c| channels << c}
end

#exchange(*attrs) ⇒ Object



29
30
31
# File 'lib/bunny_mock.rb', line 29

def exchange(*attrs)
  BunnyMock::Exchange.new(*attrs)
end

#qosObject



9
10
11
# File 'lib/bunny_mock.rb', line 9

def qos
  :qos_ok
end

#queue(*attrs) ⇒ Object



25
26
27
# File 'lib/bunny_mock.rb', line 25

def queue(*attrs)
  BunnyMock::Queue.new(*attrs)
end

#startObject



5
6
7
# File 'lib/bunny_mock.rb', line 5

def start
  :connected
end

#stopObject



13
14
15
# File 'lib/bunny_mock.rb', line 13

def stop
  nil
end