spec/lita/handlers/totems_spec.rb in lita-totems-0.3.2 vs spec/lita/handlers/totems_spec.rb in lita-totems-0.3.3

- old
+ new

@@ -174,11 +174,11 @@ end it "yields that totem, gives to the next person in line" do expect(robot).to receive(:send_messages).twice do |target, message| expect([another_user.id, carl.id]).to include(target.user.id) if target.user.id == another_user.id - expect(message).to eq(%{You are now in possession of totem "chicken."}) + expect(message).to eq(%{You are now in possession of totem "chicken," yielded by #{carl.name}.}) elsif target.user.id == carl.id expect(message).to eq("You have yielded the totem to #{another_user.name}.") end end send_message("totems yield", as: carl) @@ -360,11 +360,11 @@ expect(robot).to receive(:send_messages).twice do |target, message| expect([another_user.id, carl.id]).to include(target.user.id) if target.user.id == carl.id expect(message).to eq(%{You are now in possession of totem "chicken".}) elsif target.user.id == another_user.id - expect(message).to eq(%{You have been kicked from totem "chicken".}) + expect(message).to eq(%{You have been kicked from totem "chicken" by #{carl.name}.}) end end send_message("totems kick chicken", as: carl) end end @@ -375,10 +375,10 @@ end it "should notify that user that she has been kicked and clear the owning_user_id" do expect(robot).to receive(:send_messages).twice do |target, message| expect([another_user.id, carl.id]).to include(target.user.id) if target.user.id == carl.id - expect(message).to eq(%{You have been kicked from totem "chicken".}) + expect(message).to eq(%{You have been kicked from totem "chicken" by #{user.name}.}) elsif target.user.id == another_user.id expect(message).to eq("") end end send_message("totems kick chicken")