Sha256: a0717c9e0eec188a961e34e97fe529c5a3e773d0f5b45a4dd19b719cb4b4e061
Contents?: true
Size: 539 Bytes
Versions: 2
Compression:
Stored size: 539 Bytes
Contents
module MQTT # This class is a "stub: MQTT client that can be used to simplify # testing drastically. # It has methods that allow to "write" topics in order to send fake # messages it is a double fo class FakeMQTTClient def self.connect(*args) return FakeMQTTClient.new end def subscribe(*topics) end def unsubscribe(*topics) end def get end def publish(topic, payload = '') puts "Hey! Someone published on #{topic}: #{payload}" end def disconnect end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nutella_lib-0.6.0 | spec/stubs/fake_mqtt_client.rb |
nutella_lib-0.5.0 | spec/stubs/fake_mqtt_client.rb |