spec/lita/handlers/room_spec.rb in lita-3.3.1 vs spec/lita/handlers/room_spec.rb in lita-4.0.0.rc1
- old
+ new
@@ -1,9 +1,11 @@
+require "spec_helper"
+
describe Lita::Handlers::Room, lita_handler: true do
- it { routes_command("join #lita.io").to(:join) }
- it { routes_command("part #lita.io").to(:part) }
+ it { is_expected.to route_command("join #lita.io").to(:join) }
+ it { is_expected.to route_command("part #lita.io").to(:part) }
- before { allow(Lita::Authorization).to receive(:user_is_admin?).with(user).and_return(true) }
+ 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")