Sha256: 0f0da698bf352eba878fffdaed5abe866c7a4bc203d2dd9869bfb8d69e2913a7

Contents?: true

Size: 626 Bytes

Versions: 18

Compression:

Stored size: 626 Bytes

Contents

require "spec_helper"

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

  describe "#ping" do
    let(:from) do
      "alice"
    end

    let(:to) do
      "#general"
    end

    let(:said) do
      "@ruboty ping"
    end

    let(:replied) do
      "pong"
    end

    it "returns PONG to PING" do
      robot.should_receive(:say).with(
        body: replied,
        from: to,
        to: from,
        original: {
          body: said,
          from: from,
          robot: robot,
          to: to,
        },
      )
      robot.receive(body: said, from: from, to: to)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruboty-1.2.2 spec/ruboty/handlers/ping_spec.rb
ruboty-1.2.1 spec/ruboty/handlers/ping_spec.rb
ruboty-1.2.0 spec/ruboty/handlers/ping_spec.rb
ruboty-1.1.9 spec/ruboty/handlers/ping_spec.rb
ruboty-1.1.8 spec/ruboty/handlers/ping_spec.rb
ruboty-1.1.7 spec/ruboty/handlers/ping_spec.rb
ruboty-1.1.6 spec/ruboty/handlers/ping_spec.rb
ruboty-1.1.5 spec/ruboty/handlers/ping_spec.rb
ruboty-1.1.4 spec/ruboty/handlers/ping_spec.rb
ruboty-1.1.3 spec/ruboty/handlers/ping_spec.rb
ruboty-1.1.2 spec/ruboty/handlers/ping_spec.rb
ruboty-1.1.1 spec/ruboty/handlers/ping_spec.rb
ruboty-1.1.0 spec/ruboty/handlers/ping_spec.rb
ruboty-1.0.4 spec/ruboty/handlers/ping_spec.rb
ruboty-1.0.3 spec/ruboty/handlers/ping_spec.rb
ruboty-1.0.2 spec/ruboty/handlers/ping_spec.rb
ruboty-1.0.1 spec/ruboty/handlers/ping_spec.rb
ruboty-1.0.0 spec/ruboty/handlers/ping_spec.rb