Sha256: e16b2b87574acbe0bcb60d29068c7b1a8c53b30486918c73149f543188d0da38

Contents?: true

Size: 569 Bytes

Versions: 1

Compression:

Stored size: 569 Bytes

Contents

require "spec_helper"

describe Lita::Handlers::Stocks, lita_handler: true do
  it { routes_command("stock GOOG").to(:stock_info) }
  it { doesnt_route_command("stock").to(:stock_info) }

  it "checks default stock" do
    send_command "stock GOOG"
    expect(replies.last).to include("Google Inc")
    expect(replies.last).to include("GOOG")
    expect(replies.last).to include("NASDAQ")
  end

  it "checks an invalid stock" do
    send_command "stock GOOGFAKE"
    expect(replies.last).to eq("Sorry, but there was a problem retrieving stock information.")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lita-stocks-0.0.3 spec/lita/handlers/stocks_spec.rb