Sha256: 124a0dae7df32f9799ef725b550987c6d81b8df915c8a51515d6da5adffe5829

Contents?: true

Size: 527 Bytes

Versions: 2

Compression:

Stored size: 527 Bytes

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lita-karotz_actions-0.0.2 spec/lita/handlers/karotz_actions_spec.rb
lita-karotz_actions-0.0.1 spec/lita/handlers/karotz_actions_spec.rb