Sha256: 6a171a17698560586735499ba425977b7400a108470302de2fa924183bae2de7

Contents?: true

Size: 422 Bytes

Versions: 3

Compression:

Stored size: 422 Bytes

Contents

require "spec_helper"

describe Ellen::Handlers::Ping do
  let(:robot) do
    Ellen::Robot.new
  end

  describe "#ping" do
    {
      "@ellen ping" => "pong",
      "@ellen Ping" => "Pong",
      "@ellen PING" => "PONG",
    }.each do |input, output|
      it "responds to `#{input}` and says `#{output}`" do
        robot.should_receive(:say).with(output)
        robot.receive(body: input)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ellen-0.1.3 spec/ellen/handlers/ping_spec.rb
ellen-0.1.2 spec/ellen/handlers/ping_spec.rb
ellen-0.1.1 spec/ellen/handlers/ping_spec.rb