Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit 950797e

Browse files
committed
Update Cinch call to avoid deprecation warning.
1 parent 83ec477 commit 950797e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/lita/adapters/irc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def send_message_to_target(target, string)
108108
string_without_action = string.gsub(/^\/me\s+/i, "")
109109

110110
if string == string_without_action
111-
target.msg(string)
111+
target.send(string)
112112
else
113113
target.action(string_without_action)
114114
end

spec/lita/adapters/irc_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
source = instance_double("Lita::Source", room: "#foo", private_message?: false)
7373
channel = instance_double("Cinch::Channel")
7474
allow(Cinch::Channel).to receive(:new).with("#foo", subject.cinch).and_return(channel)
75-
expect(channel).to receive(:msg).with("Hello!")
76-
expect(channel).to receive(:msg).with("How are you?")
75+
expect(channel).to receive(:send).with("Hello!")
76+
expect(channel).to receive(:send).with("How are you?")
7777
subject.send_messages(source, ["Hello!", "How are you?"])
7878
end
7979

@@ -90,8 +90,8 @@
9090
source = instance_double("Lita::Source", user: user, private_message?: true)
9191
user = instance_double("Cinch::User")
9292
allow(Cinch::User).to receive(:new).with("Carl", subject.cinch).and_return(user)
93-
expect(user).to receive(:msg).with("Hello!")
94-
expect(user).to receive(:msg).with("How are you?")
93+
expect(user).to receive(:send).with("Hello!")
94+
expect(user).to receive(:send).with("How are you?")
9595
subject.send_messages(source, ["Hello!", "How are you?"])
9696
end
9797

0 commit comments

Comments
 (0)