Farmbot-Web-App/spec/topic_stub.rb
2018-02-20 15:03:25 -06:00

22 lines
307 B
Ruby

# Fake RabbitMQ adapter for when we test things.
class TopicStub
def self.publish(msg, opts)
end
end
class ChannelStub
def self.topic(name, opts)
return TopicStub
end
end
class MQTTStub
def self.create_channel
return ChannelStub
end
end
def Transport.connection
return MQTTStub
end