Sha256: 28056c92f9b4e3272e76859b45e9858fe4427193feae6edc835145518fede3b7

Contents?: true

Size: 685 Bytes

Versions: 4

Compression:

Stored size: 685 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe Lita::Handlers::Room, lita_handler: true do
  it { is_expected.to route_command("join #lita.io").to(:join) }
  it { is_expected.to route_command("part #lita.io").to(:part) }

  before { allow(robot.auth).to receive(:user_is_admin?).with(user).and_return(true) }

  describe "#join" do
    it "calls Robot#join with the provided ID" do
      expect(robot).to receive(:join).with("#lita.io")
      send_command("join #lita.io")
    end
  end

  describe "#part" do
    it "calls Robot#part with the provided ID" do
      expect(robot).to receive(:part).with("#lita.io")
      send_command("part #lita.io")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rita-5.0.0.alpha.4 spec/lita/handlers/room_spec.rb
rita-5.0.0.alpha.3 spec/lita/handlers/room_spec.rb
rita-5.0.0.alpha.2 spec/lita/handlers/room_spec.rb
rita-5.0.0.alpha.1 spec/lita/handlers/room_spec.rb