Sha256: 0b70ef376754a96648dd1453cfd4e67f7d1f8deedd85e0ac2dc2cc1c962285db

Contents?: true

Size: 654 Bytes

Versions: 25

Compression:

Stored size: 654 Bytes

Contents

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

25 entries across 25 versions & 2 rubygems

Version Path
lita-4.8.0 spec/lita/handlers/room_spec.rb
lita-4.8.0.beta1 spec/lita/handlers/room_spec.rb
lita-4.7.1 spec/lita/handlers/room_spec.rb
lita-default-handlers-0.1.0 spec/lita/handlers/room_spec.rb
lita-4.7.0 spec/lita/handlers/room_spec.rb
lita-4.6.1 spec/lita/handlers/room_spec.rb
lita-4.6.0 spec/lita/handlers/room_spec.rb
lita-4.5.0 spec/lita/handlers/room_spec.rb
lita-4.4.3 spec/lita/handlers/room_spec.rb
lita-4.4.2 spec/lita/handlers/room_spec.rb
lita-4.4.1 spec/lita/handlers/room_spec.rb
lita-4.4.0 spec/lita/handlers/room_spec.rb
lita-4.3.2 spec/lita/handlers/room_spec.rb
lita-4.3.1 spec/lita/handlers/room_spec.rb
lita-4.3.0 spec/lita/handlers/room_spec.rb
lita-4.2.1 spec/lita/handlers/room_spec.rb
lita-4.2.0 spec/lita/handlers/room_spec.rb
lita-4.1.0 spec/lita/handlers/room_spec.rb
lita-4.0.4 spec/lita/handlers/room_spec.rb
lita-4.0.3 spec/lita/handlers/room_spec.rb