diff --git a/rakelib/docs.rake b/rakelib/docs.rake index 91afb56ba4..927128dbe8 100644 --- a/rakelib/docs.rake +++ b/rakelib/docs.rake @@ -1,6 +1,10 @@ # frozen_string_literal: true -require "yard" +begin + require "yard" +rescue LoadError + return +end namespace :docs do yard_dir = File.join("docs", "yard") diff --git a/spec/openhab/core/things/thing_spec.rb b/spec/openhab/core/things/thing_spec.rb index 1d4e1a3135..6ce752feb3 100644 --- a/spec/openhab/core/things/thing_spec.rb +++ b/spec/openhab/core/things/thing_spec.rb @@ -78,10 +78,10 @@ end it "returns true for bridges" do - install_addon "binding-mqtt", ready_markers: "openhab.xmlThingTypes" - things.build { bridge "mqtt:broker:mosquitto", "MQTT Broker" } + install_addon "binding-dscalarm", ready_markers: "openhab.xmlThingTypes" + things.build { bridge "dscalarm:tcpserver:panel", "Alarm Panel" } - expect(things["mqtt:broker:mosquitto"]).to be_bridge + expect(things["dscalarm:tcpserver:panel"]).to be_bridge end end end diff --git a/spec/openhab/dsl/things/builder_spec.rb b/spec/openhab/dsl/things/builder_spec.rb index 57e9c4b483..1ccb244791 100644 --- a/spec/openhab/dsl/things/builder_spec.rb +++ b/spec/openhab/dsl/things/builder_spec.rb @@ -328,22 +328,22 @@ def build_and_update(org_config, new_config, thing_to_keep: :new_thing, &block) end describe "#bridge" do - before { install_addon "binding-mqtt", ready_markers: "openhab.xmlThingTypes" } + before { install_addon "binding-dscalarm", ready_markers: "openhab.xmlThingTypes" } it "can create a bridge" do things.build do - bridge "mqtt:broker:mybroker", config: { host: "127.0.0.1" } + bridge "dscalarm:tcpserver:panel", config: { ipAddress: "127.0.0.1" } end end it "can create nested things" do things.build do - bridge "mqtt:broker:mybroker", config: { host: "127.0.0.1" } do - thing "mqtt:topic:mytopic", config: { stateTopic: "mything/mytopic" } + bridge "dscalarm:tcpserver:panel", config: { ipAddress: "127.0.0.1" } do + thing "dscalarm:zone:front_door", config: { zoneNumber: 1 } end end - expect(things["mqtt:topic:mytopic"].bridge_uid).to eq "mqtt:broker:mybroker" + expect(things["dscalarm:zone:front_door"].bridge_uid).to eq "dscalarm:tcpserver:panel" end end end