require "spec_helper" describe Lita::Handlers::KarotzActions, lita_handler: true do before :each do Lita.config.handlers.karotz_actions.karot_kake_url = "http://example.com/waffles" allow(RestClient).to receive(:post) end it { routes_command("k ears").to(:ears) } it { routes_command("k message i like waffles").to(:message) } it { routes_command("k nyan").to(:nyan) } it "call karot kake with a message" do expect(RestClient).to receive(:post) send_command("k message i like waffles") end end