diff --git a/lib/lita/robot.rb b/lib/lita/robot.rb index 2152eb5d..dbda3271 100644 --- a/lib/lita/robot.rb +++ b/lib/lita/robot.rb @@ -36,6 +36,11 @@ class Robot def_delegators :registry, :config, :adapters, :handlers, :hooks + # @!method mention_format(name) + # @see Lita::Adapter#mention_format + # @since 4.4.0 + def_delegators :adapter, :mention_format + # @param registry [Lita::Registry] The registry for the robot's configuration and plugins. def initialize(registry = Lita) @registry = registry diff --git a/spec/lita/robot_spec.rb b/spec/lita/robot_spec.rb index 9cb109ea..9d4602fe 100644 --- a/spec/lita/robot_spec.rb +++ b/spec/lita/robot_spec.rb @@ -22,6 +22,10 @@ expect(subject.mention_name).to eq("wongo") end + it "exposes Adapter#mention_format" do + expect(subject.mention_format(subject.mention_name)).to eq("Lita:") + end + context "with registered handlers" do let(:handler1) { Class.new(Lita::Handler) { namespace :test } } let(:handler2) { Class.new(Lita::Handler) { namespace :test } }