From 79d6d80f6a346b8b4297f1a67a6b39c6a965daf1 Mon Sep 17 00:00:00 2001 From: Daniel Worrall Date: Tue, 12 Jun 2018 01:20:48 +0100 Subject: Add IRC --- spec/irc_spec.cr | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 spec/irc_spec.cr (limited to 'spec/irc_spec.cr') diff --git a/spec/irc_spec.cr b/spec/irc_spec.cr new file mode 100644 index 0000000..0053024 --- /dev/null +++ b/spec/irc_spec.cr @@ -0,0 +1,11 @@ +require "./spec_helper" + +describe "PING" do + it "responds with PONG" do + response = String.build do |io| + client = Twitch::IRC.new(io, "foo", "bar") + client.dispatch FastIRC::Message.new("PING", nil) + end + response.should eq FastIRC::Message.new("PONG", ["tmi.twitch.tv"]).to_s + end +end -- cgit v1.2.3